Address Ansible bare variable usage

When executing the bootstrap-host role with Ansible 2.1, the following
deprecation warning is issued in the output for some tasks.

[DEPRECATION WARNING]: Using bare variables is deprecated.

This patch addresses the tasks to fix the behaviour appropriately.

Change-Id: I5e5dba540256935ffb03ace27c6c43abc15f52da
This commit is contained in:
Jesse Pretorius 2016-06-14 12:51:15 +01:00 committed by Major Hayden
parent f05abeb036
commit 4d01d409f6
3 changed files with 7 additions and 7 deletions

View File

@ -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:

View File

@ -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

View File

@ -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