]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
add-osds: don't hardcode group names
authorRishabh Dave <ridave@redhat.com>
Thu, 28 Mar 2019 07:45:53 +0000 (13:15 +0530)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 8 Apr 2019 08:09:00 +0000 (10:09 +0200)
Instead of hardcoding group names, import ceph-defaults earlier. Also,
rectify a minor mistake in vagrant_varaibles.yml for containerized
version of add_osds.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
infrastructure-playbooks/add-osd.yml
tests/functional/add-osds/container/vagrant_variables.yml

index 1c2d3e27d4eba628ad3d2432a9893ab9fa13703d..31861930cd2c62c0791e92368484c010ac939365 100644 (file)
       when:
         - not delegate_facts_host | bool
 
+    - import_role:
+        name: ceph-defaults
+
     - name: gather and delegate facts
       setup:
       delegate_to: "{{ item }}"
       delegate_facts: True
       with_items:
-        - "{{ groups['mons'] }}"
-        - "{{ groups['osds'] }}"
+        - "{{ groups[mon_group_name] }}"
+        - "{{ groups[osd_group_name] }}"
       run_once: True
       when:
         - delegate_facts_host | bool
 
   tasks:
-    - import_role:
-        name: ceph-defaults
-
     - import_role:
         name: ceph-facts
 
       when:
         - not delegate_facts_host | bool
 
+    - import_role:
+        name: ceph-defaults
+
     - name: gather and delegate facts
       setup:
       delegate_to: "{{ item }}"
       delegate_facts: True
       with_items:
-        - "{{ groups['mons'] }}"
-        - "{{ groups['osds'] }}"
+        - "{{ groups[mon_group_name] }}"
+        - "{{ groups[osd_group_name] }}"
       run_once: True
       when:
         - delegate_facts_host | bool
@@ -89,9 +92,6 @@
       changed_when: False
 
   tasks:
-    - import_role:
-        name: ceph-defaults
-
     - import_role:
         name: ceph-facts
 
index c0bf4174f5bf1f59d19bc0d0a13355136e0b189a..b151ccc2aaf1f154719486508982db1f5f775384 100644 (file)
@@ -1,7 +1,7 @@
 ---
 
 # DEPLOY CONTAINERIZED DAEMONS
-docker: false
+docker: true
 
 # DEFINE THE NUMBER OF VMS TO RUN
 mon_vms: 1