]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add ceph_client tag to execute or skip the playbook
authorFrancesco Pantano <fpantano@redhat.com>
Mon, 9 Nov 2020 16:25:17 +0000 (17:25 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 12 Nov 2020 19:32:10 +0000 (14:32 -0500)
There are some use cases where there's a need to skip the execution
of the ceph-ansible client role even though the client section of the
inventory isn't empty.
This can happen in contexts where the services are colocated or when
a all-in-one deployment is performed.
The purpose of this change is adding a 'ceph_client' tag to avoid
altering the ceph-ansible execution flow but at the same time be able
to include or exclude a set of tasks using this tag.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
(cherry picked from commit fafd5f871a81f5e8cdba6e531e499a9678b2dcad)

site-container.yml.sample
site.yml.sample

index 89c9a953cc30fca78c20bc091de946d1bb1a8143..bf824bdd9b74d43f8cb78c48c3595dc5589e3deb 100644 (file)
 
     - import_role:
         name: ceph-defaults
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-facts
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-handler
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-config
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-client
+      tags: ['ceph_client']
 
     # post-tasks for preceding imports -
     - name: set ceph client install 'Complete'
index 9475861960a02e8c103365ee16e1b541554f94e1..ea7e720de194dc6091ef63f6e157ded3c6a9c1e3 100644 (file)
   tasks:
     - import_role:
         name: ceph-defaults
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-facts
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-handler
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-config
-      tags: ['ceph_update_config']
+      tags: ['ceph_update_config', 'ceph_client']
     - import_role:
         name: ceph-client
+      tags: ['ceph_client']
 
   post_tasks:
     - name: set ceph client install 'Complete'