]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mons: move set_fact of openstack_keys in ceph-osd v3.1.0rc6
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 1 Jun 2018 13:11:21 +0000 (15:11 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 1 Jun 2018 16:37:18 +0000 (18:37 +0200)
Since the openstack_config.yml has been moved to `ceph-osd` we must move
this `set_fact` in ceph-osd otherwise the tasks in
`openstack_config.yml` using `openstack_keys` will actually use the
defaults value from `ceph-defaults`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1585139
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aae37b44f5f17d14034181d5777226d3a582b42d)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-mon/tasks/main.yml
roles/ceph-osd/tasks/main.yml

index 28273acceea4f78a0d992c192efa465def11ccab..8f9067154b86827e003974b6551b46c5a90b45a4 100644 (file)
 - name: include set_osd_pool_default_pg_num.yml
   include: set_osd_pool_default_pg_num.yml
 
-- name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
-  set_fact:
-    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:
-    - 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
-  set_fact:
-    openstack_keys: "{{ openstack_keys_tmp }}"
-  when:
-    - openstack_keys_tmp is defined
-
 - name: include calamari.yml
   include: calamari.yml
   when: calamari
index da84b279a04ba1c30dd3bf3220b1fcfe13611c64..197a4b7cf13b546c6f402c2b8ca346f7c1fc1695 100644 (file)
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
 
+- name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
+  set_fact:
+    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:
+    - 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
+  set_fact:
+    openstack_keys: "{{ openstack_keys_tmp }}"
+  when:
+    - openstack_keys_tmp is defined
+
 # Create the pools listed in openstack_pools
 - name: include openstack_config.yml
   include: openstack_config.yml