]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
site: ability to only generate a ceph.conf on the machines
authorSébastien Han <seb@redhat.com>
Thu, 8 Feb 2018 16:44:19 +0000 (17:44 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 9 Feb 2018 13:07:58 +0000 (14:07 +0100)
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 <seb@redhat.com>
site-docker.yml.sample
site.yml.sample

index 7ac1dfe22514f3138306c460b01297ad0f1f3abc..d16f32cfa151d0c9bfcf5a080484d15f2bd08f93 100644 (file)
@@ -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
 
   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
index f771ade0931754c969b26158a88080a18a0c5fda..29f88f24638c81d90cfdc9d315c969ccae83aa2d 100644 (file)
   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" }