diff --git a/defaults/main.yml b/defaults/main.yml index 14065dba..32987089 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/handlers/main.yml b/handlers/main.yml index 51a586ef..0035c550 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -30,4 +30,4 @@ name: "{{ item }}" state: "restarted" pattern: "{{ item }}" - with_items: glance_service_names + with_items: "{{ glance_service_names }}" diff --git a/tasks/glance_install.yml b/tasks/glance_install.yml index 67f81563..e9481462 100644 --- a/tasks/glance_install.yml +++ b/tasks/glance_install.yml @@ -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 diff --git a/tasks/glance_install_apt.yml b/tasks/glance_install_apt.yml index 95f71e25..9ba688dd 100644 --- a/tasks/glance_install_apt.yml +++ b/tasks/glance_install_apt.yml @@ -34,4 +34,4 @@ until: install_packages|success retries: 5 delay: 2 - with_items: glance_apt_packages + with_items: "{{ glance_apt_packages }}" diff --git a/tasks/glance_post_install.yml b/tasks/glance_post_install.yml index df336080..12e10fb9 100644 --- a/tasks/glance_post_install.yml +++ b/tasks/glance_post_install.yml @@ -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