]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: only run ceph-common once during tests 24274/head
authorAndrew Schoen <aschoen@redhat.com>
Tue, 25 Sep 2018 17:09:15 +0000 (12:09 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 25 Sep 2018 17:09:15 +0000 (12:09 -0500)
Using import_role we can have just one play and avoid rerunning
ceph-common over and over again in daemon specific plays.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml

index 7ebdf774ec9c16e7542f45f0a96144f2876e55b2..5a2b4e4af0d2d4f89c8a3d5f726c578bc76ce38c 100644 (file)
         - ansible_os_family == "Debian"
         - inventory_hostname in groups.get(osd_group_name, [])
 
-    - import_role:
+    - name: run ceph-config role
+      import_role:
         name: ceph-config
 
-- hosts: mons
-  gather_facts: false
-  any_errors_fatal: true
-  become: True
-  roles:
-    - role: ceph-defaults
-    - role: ceph-common
-    - role: ceph-mon
-
-- hosts: mgrs
-  gather_facts: false
-  any_errors_fatal: true
-  become: True
-  roles:
-    - role: ceph-defaults
-    - role: ceph-common
-    - role: ceph-mgr
-
-- hosts: osds
-  gather_facts: false
-  any_errors_fatal: true
-  become: True
-  roles:
-    - role: ceph-defaults
-    - role: ceph-common
-  tasks:
-    - name: rsync ceph-volume to test nodes on centos
-      synchronize:
-        src: "{{ toxinidir}}/../../../../ceph_volume"
-        dest: "/usr/lib/python2.7/site-packages"
-        use_ssh_args: true
+    - name: run ceph-mon role
+      import_role:
+        name: ceph-mon
       when:
-        - ansible_os_family == "RedHat"
+        - inventory_hostname in groups.get(mon_group_name, [])
 
-    - name: rsync ceph-volume to test nodes on ubuntu
-      synchronize:
-        src: "{{ toxinidir}}/../../../../ceph_volume"
-        dest: "/usr/lib/python2.7/dist-packages"
-        use_ssh_args: true
+    - name: run ceph-mgr role
+      import_role:
+        name: ceph-mgr
       when:
-        - ansible_os_family == "Debian"
+        - inventory_hostname in groups.get(mgr_group_name, [])
 
-    - import_role:
+    - name: run ceph-osd role
+      import_role:
         name: ceph-osd
+      when:
+        - inventory_hostname in groups.get(osd_group_name, [])