Add ceph_client tag to execute or skip the playbook

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 fafd5f871a)
pull/6026/head
Francesco Pantano 2020-11-09 17:25:17 +01:00 committed by Dimitri Savineau
parent 33f74771d2
commit b0700d3edd
2 changed files with 10 additions and 8 deletions

View File

@ -283,18 +283,19 @@
- import_role: - import_role:
name: ceph-defaults name: ceph-defaults
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-facts name: ceph-facts
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-handler name: ceph-handler
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-config name: ceph-config
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-client name: ceph-client
tags: ['ceph_client']
# post-tasks for preceding imports - # post-tasks for preceding imports -
- name: set ceph client install 'Complete' - name: set ceph client install 'Complete'

View File

@ -272,18 +272,19 @@
tasks: tasks:
- import_role: - import_role:
name: ceph-defaults name: ceph-defaults
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-facts name: ceph-facts
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-handler name: ceph-handler
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-config name: ceph-config
tags: ['ceph_update_config'] tags: ['ceph_update_config', 'ceph_client']
- import_role: - import_role:
name: ceph-client name: ceph-client
tags: ['ceph_client']
post_tasks: post_tasks:
- name: set ceph client install 'Complete' - name: set ceph client install 'Complete'