]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: set 'openstack_keys_tmp' only when 'openstack_config' is defined.
authorKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 8 Jun 2018 18:03:00 +0000 (01:03 +0700)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 12 Jun 2018 06:23:14 +0000 (08:23 +0200)
If 'openstack_config' is false this task shouldn't be executed.

Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
(cherry picked from commit 3a07568496f718ffe44077eac23d7397a17b3b09)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-osd/tasks/main.yml

index 197a4b7cf13b546c6f402c2b8ca346f7c1fc1695..11b3e18c69b7c397f4751fe7a7de9a012a3e990b 100644 (file)
@@ -89,6 +89,7 @@
     openstack_keys_tmp: "{{ openstack_keys_tmp|default([]) + [ { 'key': item.key, 'name': item.name, 'caps': { 'mon': item.mon_cap, 'osd': item.osd_cap|default(''), 'mds': item.mds_cap|default(''), 'mgr': item.mgr_cap|default('') } , 'mode': item.mode } ] }}"
   with_items: "{{ openstack_keys }}"
   when:
+    - openstack_config
     - item.get('mon_cap', None) # it's enough to assume we are running an old-fashionned syntax simply by checking the presence of mon_cap since every key needs this cap
 
 - name: set_fact keys - override keys_tmp with keys