Skip to content

Commit

Permalink
ceph-volume: only run ceph-common once during tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andrewschoen committed Sep 25, 2018
1 parent eed2444 commit a813861
Showing 1 changed file with 14 additions and 40 deletions.
54 changes: 14 additions & 40 deletions src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml
Expand Up @@ -97,50 +97,24 @@
- 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, [])

0 comments on commit a813861

Please sign in to comment.