Merge "Address Ansible bare variable usage"

This commit is contained in:
Jenkins 2016-06-15 22:35:23 +00:00 committed by Gerrit Code Review
commit ab8e272f7f
8 changed files with 18 additions and 16 deletions

View File

@ -68,8 +68,8 @@
# If I'm correct, the use case for multiple users is on the computre nodes, # If I'm correct, the use case for multiple users is on the computre nodes,
# access needed by users libvirt-qemu and nova # access needed by users libvirt-qemu and nova
mode: 0640 mode: 0640
with_items: ceph_client_keyrings.results with_items: "{{ ceph_client_keyrings.results }}"
when: not item|skipped and inventory_hostname in groups[item.item.0.component] when: not item | skipped and inventory_hostname in groups[item.item.0.component]
notify: notify:
- Restart os services - Restart os services
tags: tags:

View File

@ -20,7 +20,7 @@
# failed_when: false is needed to not loose any hosts, as this check expects # failed_when: false is needed to not loose any hosts, as this check expects
# some to be down. # some to be down.
local_action: command nc -w 1 {{ item }} 22 local_action: command nc -w 1 {{ item }} 22
with_items: '{{ ceph_mons }}' with_items: "{{ ceph_mons }}"
changed_when: false changed_when: false
failed_when: false failed_when: false
register: ceph_mon_upcheck register: ceph_mon_upcheck
@ -33,7 +33,7 @@
set_fact: set_fact:
ceph_mon_host: '{{ item.item }}' ceph_mon_host: '{{ item.item }}'
when: item.rc == 0 and "OpenSSH" in item.stdout when: item.rc == 0 and "OpenSSH" in item.stdout
with_items: ceph_mon_upcheck.results with_items: "{{ ceph_mon_upcheck.results }}"
tags: tags:
- ceph-config-create-config - ceph-config-create-config
- ceph-auth-client-keyrings - ceph-auth-client-keyrings

View File

@ -18,7 +18,7 @@
id: "{{ item }}" id: "{{ item }}"
state: "absent" state: "absent"
register: revoke_keys register: revoke_keys
with_items: ceph_revoked_gpg_keys with_items: "{{ ceph_revoked_gpg_keys }}"
when: ceph_pkg_source == 'ceph' when: ceph_pkg_source == 'ceph'
tags: tags:
- ceph-apt-keys - ceph-apt-keys
@ -35,7 +35,7 @@
ignore_errors: True ignore_errors: True
retries: 5 retries: 5
delay: 2 delay: 2
with_items: ceph_gpg_keys with_items: "{{ ceph_gpg_keys }}"
when: ceph_pkg_source == 'ceph' when: ceph_pkg_source == 'ceph'
tags: tags:
- ceph-apt-keys - ceph-apt-keys
@ -50,7 +50,7 @@
until: add_keys_fallback|success until: add_keys_fallback|success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: ceph_gpg_keys with_items: "{{ ceph_gpg_keys }}"
when: ceph_pkg_source == 'ceph' and when: ceph_pkg_source == 'ceph' and
add_keys|failed and add_keys|failed and
(item.fallback_keyserver is defined or (item.fallback_keyserver is defined or

View File

@ -44,7 +44,7 @@
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: haproxy_packages with_items: "{{ haproxy_packages }}"
tags: tags:
- haproxy-apt-packages - haproxy-apt-packages

View File

@ -21,6 +21,6 @@
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: haproxy_packages with_items: "{{ haproxy_packages }}"
tags: tags:
- haproxy-yum-packages - haproxy-yum-packages

View File

@ -17,7 +17,7 @@
template: template:
src: service.j2 src: service.j2
dest: "/etc/haproxy/conf.d/{{ item.service.haproxy_service_name }}" dest: "/etc/haproxy/conf.d/{{ item.service.haproxy_service_name }}"
with_items: haproxy_service_configs with_items: "{{ haproxy_service_configs }}"
when: > when: >
(item.service.haproxy_backend_nodes is defined and (item.service.haproxy_backend_nodes is defined and
item.service.haproxy_backend_nodes | length > 0) or item.service.haproxy_backend_nodes | length > 0) or

View File

@ -23,7 +23,9 @@
with_items: with_items:
- { src: "{{ haproxy_user_ssl_cert }}", dest: "{{ haproxy_ssl_cert }}", mode: "0644" } - { src: "{{ haproxy_user_ssl_cert }}", dest: "{{ haproxy_ssl_cert }}", mode: "0644" }
- { src: "{{ haproxy_user_ssl_key }}", dest: "{{ haproxy_ssl_key }}", mode: "0640" } - { 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: notify:
- regen pem - regen pem
tags: tags:

View File

@ -72,7 +72,7 @@
apt: apt:
name: "{{ item }}" name: "{{ item }}"
state: absent state: absent
with_items: packages_remove with_items: "{{ packages_remove }}"
tags: tags:
- remove-packages - remove-packages
@ -80,7 +80,7 @@
apt: apt:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: packages_install with_items: "{{ packages_install }}"
tags: tags:
- install-packages - install-packages
@ -88,7 +88,7 @@
apt: apt:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: packages_mongodb with_items: "{{ packages_mongodb }}"
when: bootstrap_host_mongodb_service | bool when: bootstrap_host_mongodb_service | bool
tags: tags:
- install-mongodb - install-mongodb
@ -97,7 +97,7 @@
apt: apt:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: packages_libvirt with_items: "{{ packages_libvirt }}"
when: bootstrap_host_libvirt_config | bool when: bootstrap_host_libvirt_config | bool
tags: tags:
- install-libvirt - install-libvirt