Ansible 2.x - Address deprecation warning of bare variables

Ansible 2.2 will not allow "bare" variable references
in with_* loops. See https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
for details.

Change-Id: I7475fbbfcf04ba528ea8718117b8d6afdd6f4971
This commit is contained in:
Travis Truman 2016-04-21 14:43:20 -04:00
parent 55dd09a478
commit 696414750b
5 changed files with 16 additions and 15 deletions

View File

@ -153,10 +153,15 @@ glance_policy_file: policy.json
glance_policy_default_rule: default
glance_policy_dirs: policy.d
## Define nfs information for glance. When the glance_nfs_client dictionary is
## defined it will enable nfs shares as mounted directories. The
## ``glance_nfs_client`` value is a list of dictionaries that must be filled
## out completely to enable the persistent NFS mounts.
# Define nfs information to enable nfs shares as mounted directories for
# glance. The ``glance_nfs_client`` value is a list of dictionaries that must
# be filled out completely to enable the persistent NFS mounts.
glance_nfs_client: []
# Example of the expected dict structure:
#
# glance_nfs_client:
# - server: "127.0.0.1" ## Hostname or IP address of NFS Server
# remote_path: "/images" ## Remote path from the NFS server's export

View File

@ -30,4 +30,4 @@
name: "{{ item }}"
state: "restarted"
pattern: "{{ item }}"
with_items: glance_service_names
with_items: "{{ glance_service_names }}"

View File

@ -74,7 +74,7 @@
until: install_packages|success
retries: 5
delay: 2
with_items: glance_requires_pip_packages
with_items: "{{ glance_requires_pip_packages }}"
tags:
- glance-install
- glance-pip-packages
@ -192,7 +192,7 @@
until: install_packages|success
retries: 5
delay: 2
with_items: glance_pip_packages
with_items: "{{ glance_pip_packages }}"
when:
- glance_venv_enabled | bool
- glance_get_venv | failed or glance_developer_mode | bool
@ -211,7 +211,7 @@
until: install_packages|success
retries: 5
delay: 2
with_items: glance_pip_packages
with_items: "{{ glance_pip_packages }}"
when:
- not glance_venv_enabled | bool
- not glance_developer_mode | bool

View File

@ -34,4 +34,4 @@
until: install_packages|success
retries: 5
delay: 2
with_items: glance_apt_packages
with_items: "{{ glance_apt_packages }}"

View File

@ -77,9 +77,7 @@
file:
path: "{{ item.local_path }}"
state: directory
with_items: glance_nfs_client
when: >
glance_nfs_client is defined
with_items: "{{ glance_nfs_client }}"
tags:
- glance-nfs
- glance-nfs-local-path
@ -91,9 +89,7 @@
fstype: "{{ item.type }}"
opts: "{{ item.options }}"
state: "mounted"
with_items: glance_nfs_client
when: >
glance_nfs_client is defined
with_items: "{{ glance_nfs_client }}"
tags:
- glance-nfs
- glance-nfs-local-path