Skip to content

Commit

Permalink
Add ceph_client tag to execute or skip the playbook
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fmount authored and guits committed Nov 12, 2020
1 parent 3e49258 commit fafd5f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions site-container.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,19 @@

- 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'
Expand Down
9 changes: 5 additions & 4 deletions site.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -271,18 +271,19 @@
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'
Expand Down

0 comments on commit fafd5f8

Please sign in to comment.