From ff90661033c6d68a768a3e6794046d50888d5d02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 8 Feb 2018 17:44:19 +0100 Subject: [PATCH] site: ability to only generate a ceph.conf on the machines MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now by running the playbook like this: ansible-playbook site.yml --tags='ceph_update_config' You can only generate a ceph configuration file on the nodes. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1543434 Signed-off-by: Sébastien Han --- site-docker.yml.sample | 40 +++++++++++++++++++------------------- site.yml.sample | 44 +++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 7ac1dfe22..d16f32cfa 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -67,9 +67,9 @@ become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-mon serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS @@ -77,70 +77,70 @@ become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - { role: ceph-config, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } + - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - { role: ceph-mgr, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - hosts: osds become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-osd - hosts: mdss become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-mds - hosts: rgws become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rgw - hosts: nfss become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - { role: ceph-config, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } + - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - { role: ceph-nfs, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - hosts: rbdmirrors become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rbd-mirror - hosts: restapis become: True gather_facts: false roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-restapi - hosts: clients become: True gather_facts: false roles: - - ceph-defaults - - ceph-docker-common - - ceph-config - - ceph-client + - { role: ceph-defaults, tags: ['ceph_update_config'] } + - ceph-docker-common + - { role: ceph-config, tags: ['ceph_update_config'] } + - ceph-client diff --git a/site.yml.sample b/site.yml.sample index f771ade09..29f88f246 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -72,98 +72,98 @@ gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-mon - hosts: mgrs gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - { role: ceph-config, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } + - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - { role: ceph-mgr, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - hosts: agents gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-agent - hosts: osds gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-osd - hosts: mdss gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-mds - hosts: rgws gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rgw - hosts: nfss gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - { role: ceph-config, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } + - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - { role: ceph-nfs, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - hosts: restapis gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-restapi - hosts: rbdmirrors gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rbd-mirror - hosts: clients gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - ceph-config + - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-client - hosts: iscsi-gws gather_facts: false become: True roles: - - ceph-defaults + - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-common - - { role: ceph-config, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } + - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } - { role: ceph-iscsi-gw, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" } -- 2.39.5