diff --git a/CHANGELOG.md b/CHANGELOG.md index 8608773f..0dca53de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -253,3 +253,7 @@ - Add initial Vault Enterprise installation tasks - Update when statements to avoid warnings about template delimiters - Update documentation + +## v1.6.1 (UNRELEASED) + +- Further task cleanup diff --git a/tasks/main.yml b/tasks/main.yml index c957f337..65d646f7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,23 +8,31 @@ - name: Fail if not a new release of Red Hat / CentOS fail: - msg: "{{ ansible_distribution_version }} is not an acceptable version of {{ ansible_distribution }} for this role" - when: ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_version|version_compare(7, '<') + msg: "{{ ansible_distribution_version }} is not a supported version of {{ ansible_distribution }} for this role" + when: + - ansible_distribution in ['RedHat', 'CentOS'] + - ansible_distribution_version|version_compare(7, '<') - name: Fail if not a new release of Debian fail: - msg: "{{ ansible_distribution_version }} is not an acceptable version of {{ ansible_distribution }} for this role" - when: ansible_distribution == "Debian" and ansible_distribution_version|version_compare(8.5, '<') + msg: "{{ ansible_distribution_version }} is not a supported version of {{ ansible_distribution }} for this role" + when: + - ansible_distribution == "Debian" + - ansible_distribution_version|version_compare(8.5, '<') - name: Fail if not a new release of FreeBSD fail: msg: "{{ ansible_distribution_version }} is not a supported version." - when: ansible_distribution == "FreeBSD" and ansible_distribution_version|version_compare(10, '<') + when: + - ansible_distribution == "FreeBSD" + - ansible_distribution_version|version_compare(10, '<') - name: Fail if not a new release of Ubuntu fail: - msg: "{{ ansible_distribution_version }} is not an acceptable version of {{ ansible_distribution }} for this role" - when: ansible_distribution == "Ubuntu" and ansible_distribution_version|version_compare(13.04, '<') + msg: "{{ ansible_distribution_version }} is not a supported version of {{ ansible_distribution }} for this role" + when: + - ansible_distribution == "Ubuntu" + - ansible_distribution_version|version_compare(13.04, '<') - name: Create OS cluster grouping group_by: @@ -44,19 +52,19 @@ - name: Include OS-specific variables include_vars: "{{ ansible_os_family }}.yml" -- name: Install OS packages and Vault Enterprise +- name: Install OS packages and Vault Enterprise via control host include: install.yml when: - vault_enterprise | bool - not vault_install_remotely | bool -- name: Install OS packages and vault - locally +- name: Install OS packages and Vault via control host include: install.yml when: - not vault_enterprise | bool - not vault_install_remotely | bool -- name: Install OS packages and vault - remotely +- name: Install OS packages and Vault via remote hosts include: install_remote.yml when: - not vault_enterprise | bool @@ -105,7 +113,11 @@ owner: root group: root mode: "0755" - when: not ansible_service_mgr == "systemd" and not ansible_os_family == "Debian" and not ansible_os_family == "FreeBSD" and not ansible_os_family == "Solaris" + when: + - not ansible_service_mgr == "systemd" + - not ansible_os_family == "Debian" + - not ansible_os_family == "FreeBSD" + - not ansible_os_family == "Solaris" - name: Debian init script template: @@ -114,7 +126,11 @@ owner: root group: root mode: "0755" - when: not ansible_service_mgr == "systemd" and ansible_os_family == "Debian" and not ansible_os_family == "FreeBSD" and not ansible_os_family == "Solaris" + when: + - not ansible_service_mgr == "systemd" + - ansible_os_family == "Debian" + - not ansible_os_family == "FreeBSD" + - not ansible_os_family == "Solaris" - name: systemd unit template: @@ -123,7 +139,10 @@ owner: root group: root mode: "0644" - when: ansible_service_mgr == "systemd" and not ansible_os_family == "FreeBSD" and not ansible_os_family == "Solaris" + when: + - ansible_service_mgr == "systemd" + - not ansible_os_family == "FreeBSD" + - not ansible_os_family == "Solaris" - name: Start Vault service: