From: Guillaume Abrioux Date: Fri, 28 Jul 2017 20:48:13 +0000 (+0200) Subject: Move role dependencies in site.yml/site-docker.yml X-Git-Tag: v3.0.0rc1~10^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5adbf0fdaa270e35b82a90ec93ba709dd443411a;p=ceph-ansible.git Move role dependencies in site.yml/site-docker.yml This will give us more flexibility and avoid a lot of useless when skipping all tasks from a non-desired role. Signed-off-by: Guillaume Abrioux --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index ddb5c37ce..5c0919732 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -93,8 +93,8 @@ roles: - ceph-defaults - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } + - { role: ceph-common, when: not containerized_deployment } + - { role: ceph-docker-common, when: containerized_deployment } - ceph-mon post_tasks: @@ -229,8 +229,8 @@ roles: - ceph-defaults - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } + - { role: ceph-common, when: not containerized_deployment } + - { role: ceph-docker-common, when: containerized_deployment } - ceph-osd post_tasks: @@ -349,8 +349,8 @@ roles: - ceph-defaults - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } + - { role: ceph-common, when: not containerized_deployment } + - { role: ceph-docker-common, when: containerized_deployment } - ceph-mds post_tasks: @@ -422,8 +422,8 @@ roles: - ceph-defaults - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } + - { role: ceph-common, when: not containerized_deployment } + - { role: ceph-docker-common, when: containerized_deployment } - ceph-rgw post_tasks: @@ -471,5 +471,5 @@ roles: - ceph-defaults - - ceph.ceph-common + - ceph-common - ceph-client diff --git a/roles/ceph-client/meta/main.yml b/roles/ceph-client/meta/main.yml index f0a366a39..98d8c91d7 100644 --- a/roles/ceph-client/meta/main.yml +++ b/roles/ceph-client/meta/main.yml @@ -10,5 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common } +dependencies: [] diff --git a/roles/ceph-mds/meta/main.yml b/roles/ceph-mds/meta/main.yml index 9b7943261..7f5d25ce6 100644 --- a/roles/ceph-mds/meta/main.yml +++ b/roles/ceph-mds/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-mgr/meta/main.yml b/roles/ceph-mgr/meta/main.yml index 6829b9ebc..ffe7e8299 100644 --- a/roles/ceph-mgr/meta/main.yml +++ b/roles/ceph-mgr/meta/main.yml @@ -13,6 +13,4 @@ galaxy_info: - 7 categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-mon/meta/main.yml b/roles/ceph-mon/meta/main.yml index 0d99a1b3b..797a14daf 100644 --- a/roles/ceph-mon/meta/main.yml +++ b/roles/ceph-mon/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-nfs/meta/main.yml b/roles/ceph-nfs/meta/main.yml index 9b3052388..5c3d8a611 100644 --- a/roles/ceph-nfs/meta/main.yml +++ b/roles/ceph-nfs/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-osd/meta/main.yml b/roles/ceph-osd/meta/main.yml index ef9c436af..afa08ec9e 100644 --- a/roles/ceph-osd/meta/main.yml +++ b/roles/ceph-osd/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-rbd-mirror/meta/main.yml b/roles/ceph-rbd-mirror/meta/main.yml index a73a1447c..4a0799943 100644 --- a/roles/ceph-rbd-mirror/meta/main.yml +++ b/roles/ceph-rbd-mirror/meta/main.yml @@ -13,6 +13,4 @@ galaxy_info: - 7 categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-restapi/meta/main.yml b/roles/ceph-restapi/meta/main.yml index 809d979c2..fb4a0bc78 100644 --- a/roles/ceph-restapi/meta/main.yml +++ b/roles/ceph-restapi/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/roles/ceph-rgw/meta/main.yml b/roles/ceph-rgw/meta/main.yml index cffb6d934..745a72174 100644 --- a/roles/ceph-rgw/meta/main.yml +++ b/roles/ceph-rgw/meta/main.yml @@ -10,6 +10,4 @@ galaxy_info: - trusty categories: - system -dependencies: - - { role: ceph.ceph-common, when: not containerized_deployment } - - { role: ceph.ceph-docker-common, when: containerized_deployment } +dependencies: [] diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 8bafee7cd..5740c399f 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -19,45 +19,63 @@ become: True gather_facts: false roles: - - ceph-mon + - ceph-defaults + - ceph-docker-common + - ceph-mon serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS - hosts: osds become: True roles: - - ceph-osd + - ceph-defaults + - ceph-docker-common + - ceph-osd - hosts: mdss become: True roles: - - ceph-mds + - ceph-defaults + - ceph-docker-common + - ceph-mds - hosts: rgws become: True roles: - - ceph-rgw + - ceph-defaults + - ceph-docker-common + - ceph-rgw - hosts: nfss become: True roles: - - ceph-nfs + - ceph-defaults + - ceph-docker-common + - ceph-nfs - hosts: rbd_mirrors become: True roles: - - ceph-rbd-mirror + - ceph-defaults + - ceph-docker-common + - ceph-rbd-mirror - hosts: restapis become: True roles: - - ceph-restapi + - ceph-defaults + - ceph-docker-common + - ceph-restapi - hosts: mgrs become: True roles: + - { role: ceph-defaults, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } + - { role: ceph-docker-common, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } - hosts: clients become: True roles: + - ceph-defaults + - ceph-common - ceph-client diff --git a/site.yml.sample b/site.yml.sample index 16fd1b821..34b923427 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -42,58 +42,78 @@ gather_facts: false become: True roles: - - ceph-mon + - ceph-defaults + - ceph-common + - ceph-mon - hosts: agents gather_facts: false become: True roles: - - ceph-agent + - ceph-defaults + - ceph-common + - ceph-agent - hosts: osds gather_facts: false become: True roles: - - ceph-osd + - ceph-defaults + - ceph-common + - ceph-osd - hosts: mdss gather_facts: false become: True roles: - - ceph-mds + - ceph-defaults + - ceph-common + - ceph-mds - hosts: rgws gather_facts: false become: True roles: - - ceph-rgw + - ceph-defaults + - ceph-common + - ceph-rgw - hosts: nfss gather_facts: false become: True roles: - - ceph-nfs + - ceph-defaults + - ceph-common + - ceph-nfs - hosts: restapis gather_facts: false become: True roles: - - ceph-restapi + - ceph-defaults + - ceph-common + - ceph-restapi - hosts: rbdmirrors gather_facts: false become: True roles: - - ceph-rbd-mirror + - ceph-defaults + - ceph-common + - ceph-rbd-mirror - hosts: clients gather_facts: false become: True roles: - - ceph-client + - ceph-defaults + - ceph-common + - ceph-client - hosts: mgrs gather_facts: false become: True roles: + - { role: ceph-defaults, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } + - { role: ceph-common, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" } - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_stable_release }} > ceph_release_num.jewel" }