diff --git a/playbooks/roles/ceph_client/tasks/ceph_auth.yml b/playbooks/roles/ceph_client/tasks/ceph_auth.yml index f54b55fd6e..bc721abf5c 100644 --- a/playbooks/roles/ceph_client/tasks/ceph_auth.yml +++ b/playbooks/roles/ceph_client/tasks/ceph_auth.yml @@ -68,8 +68,8 @@ # If I'm correct, the use case for multiple users is on the computre nodes, # access needed by users libvirt-qemu and nova mode: 0640 - with_items: ceph_client_keyrings.results - when: not item|skipped and inventory_hostname in groups[item.item.0.component] + with_items: "{{ ceph_client_keyrings.results }}" + when: not item | skipped and inventory_hostname in groups[item.item.0.component] notify: - Restart os services tags: diff --git a/playbooks/roles/ceph_client/tasks/ceph_get_mon_host.yml b/playbooks/roles/ceph_client/tasks/ceph_get_mon_host.yml index 6b57dc0777..f8d4b1a720 100644 --- a/playbooks/roles/ceph_client/tasks/ceph_get_mon_host.yml +++ b/playbooks/roles/ceph_client/tasks/ceph_get_mon_host.yml @@ -20,7 +20,7 @@ # failed_when: false is needed to not loose any hosts, as this check expects # some to be down. local_action: command nc -w 1 {{ item }} 22 - with_items: '{{ ceph_mons }}' + with_items: "{{ ceph_mons }}" changed_when: false failed_when: false register: ceph_mon_upcheck @@ -33,7 +33,7 @@ set_fact: ceph_mon_host: '{{ item.item }}' when: item.rc == 0 and "OpenSSH" in item.stdout - with_items: ceph_mon_upcheck.results + with_items: "{{ ceph_mon_upcheck.results }}" tags: - ceph-config-create-config - ceph-auth-client-keyrings diff --git a/playbooks/roles/ceph_client/tasks/ceph_preinstall_apt.yml b/playbooks/roles/ceph_client/tasks/ceph_preinstall_apt.yml index 1b49a4aa11..1647b71e3b 100644 --- a/playbooks/roles/ceph_client/tasks/ceph_preinstall_apt.yml +++ b/playbooks/roles/ceph_client/tasks/ceph_preinstall_apt.yml @@ -18,7 +18,7 @@ id: "{{ item }}" state: "absent" register: revoke_keys - with_items: ceph_revoked_gpg_keys + with_items: "{{ ceph_revoked_gpg_keys }}" when: ceph_pkg_source == 'ceph' tags: - ceph-apt-keys @@ -35,7 +35,7 @@ ignore_errors: True retries: 5 delay: 2 - with_items: ceph_gpg_keys + with_items: "{{ ceph_gpg_keys }}" when: ceph_pkg_source == 'ceph' tags: - ceph-apt-keys @@ -50,7 +50,7 @@ until: add_keys_fallback|success retries: 5 delay: 2 - with_items: ceph_gpg_keys + with_items: "{{ ceph_gpg_keys }}" when: ceph_pkg_source == 'ceph' and add_keys|failed and (item.fallback_keyserver is defined or diff --git a/playbooks/roles/haproxy_server/tasks/haproxy_install_apt.yml b/playbooks/roles/haproxy_server/tasks/haproxy_install_apt.yml index 5eaec60a8a..9fb376e3e2 100644 --- a/playbooks/roles/haproxy_server/tasks/haproxy_install_apt.yml +++ b/playbooks/roles/haproxy_server/tasks/haproxy_install_apt.yml @@ -44,7 +44,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: haproxy_packages + with_items: "{{ haproxy_packages }}" tags: - haproxy-apt-packages @@ -56,4 +56,4 @@ when: - ansible_distribution_version | version_compare('16.04', '<') tags: - - haproxy-config \ No newline at end of file + - haproxy-config diff --git a/playbooks/roles/haproxy_server/tasks/haproxy_install_yum.yml b/playbooks/roles/haproxy_server/tasks/haproxy_install_yum.yml index 8d495fad29..67265fcb1c 100644 --- a/playbooks/roles/haproxy_server/tasks/haproxy_install_yum.yml +++ b/playbooks/roles/haproxy_server/tasks/haproxy_install_yum.yml @@ -21,6 +21,6 @@ until: install_packages|success retries: 5 delay: 2 - with_items: haproxy_packages + with_items: "{{ haproxy_packages }}" tags: - haproxy-yum-packages diff --git a/playbooks/roles/haproxy_server/tasks/haproxy_service_config.yml b/playbooks/roles/haproxy_server/tasks/haproxy_service_config.yml index 204183853f..026532c7bf 100644 --- a/playbooks/roles/haproxy_server/tasks/haproxy_service_config.yml +++ b/playbooks/roles/haproxy_server/tasks/haproxy_service_config.yml @@ -17,7 +17,7 @@ template: src: service.j2 dest: "/etc/haproxy/conf.d/{{ item.service.haproxy_service_name }}" - with_items: haproxy_service_configs + with_items: "{{ haproxy_service_configs }}" when: > (item.service.haproxy_backend_nodes is defined and item.service.haproxy_backend_nodes | length > 0) or diff --git a/playbooks/roles/haproxy_server/tasks/haproxy_ssl_configuration.yml b/playbooks/roles/haproxy_server/tasks/haproxy_ssl_configuration.yml index 05edfee3f2..56715e0535 100644 --- a/playbooks/roles/haproxy_server/tasks/haproxy_ssl_configuration.yml +++ b/playbooks/roles/haproxy_server/tasks/haproxy_ssl_configuration.yml @@ -23,7 +23,9 @@ with_items: - { src: "{{ haproxy_user_ssl_cert }}", dest: "{{ haproxy_ssl_cert }}", mode: "0644" } - { src: "{{ haproxy_user_ssl_key }}", dest: "{{ haproxy_ssl_key }}", mode: "0640" } - when: haproxy_user_ssl_cert is defined and haproxy_user_ssl_key is defined + when: + - haproxy_user_ssl_cert is defined + - haproxy_user_ssl_key is defined notify: - regen pem tags: diff --git a/tests/roles/bootstrap-host/tasks/install-apt.yml b/tests/roles/bootstrap-host/tasks/install-apt.yml index cc6535651f..3a73dfe6dc 100644 --- a/tests/roles/bootstrap-host/tasks/install-apt.yml +++ b/tests/roles/bootstrap-host/tasks/install-apt.yml @@ -72,7 +72,7 @@ apt: name: "{{ item }}" state: absent - with_items: packages_remove + with_items: "{{ packages_remove }}" tags: - remove-packages @@ -80,7 +80,7 @@ apt: name: "{{ item }}" state: present - with_items: packages_install + with_items: "{{ packages_install }}" tags: - install-packages @@ -88,7 +88,7 @@ apt: name: "{{ item }}" state: present - with_items: packages_mongodb + with_items: "{{ packages_mongodb }}" when: bootstrap_host_mongodb_service | bool tags: - install-mongodb @@ -97,7 +97,7 @@ apt: name: "{{ item }}" state: present - with_items: packages_libvirt + with_items: "{{ packages_libvirt }}" when: bootstrap_host_libvirt_config | bool tags: - install-libvirt