Fix service restart when using tags
If an adjustment to the rabbit config is made which rewrites the config file, and the playbook is run with --tags rabbitmq-config,rabbitmq_server-config then the new config file will be written but the service is not restarted. This patch adds tag inheritance to the include_tasks for service restarts to ensure that the service is restarted if the just the config is updated. Change-Id: Ia4bcc7a9421d16a8bc35340e1a31a3eb15519369
This commit is contained in:
parent
b9a265926f
commit
fb93d2862d
@ -74,8 +74,13 @@
|
||||
tags:
|
||||
- rabbitmq-config
|
||||
|
||||
- include_tasks: rabbitmq_restart.yml
|
||||
when: rabbit_config is changed or rabbitmq_plugin is changed or cookie_set is changed or rabbitmq_upgrade | bool
|
||||
- include_tasks:
|
||||
file: rabbitmq_restart.yml
|
||||
apply:
|
||||
tags: rabbitmq-config
|
||||
when: rabbit_config is changed or rabbitmq_plugin is changed or (cookie_set is defined and cookie_set is changed) or rabbitmq_upgrade | bool
|
||||
tags:
|
||||
- rabbitmq-config
|
||||
|
||||
- name: Apply rabbitmq policies
|
||||
community.rabbitmq.rabbitmq_policy:
|
||||
@ -90,8 +95,13 @@
|
||||
- rabbitmq-config
|
||||
- rabbitmq-cluster
|
||||
|
||||
- include_tasks: rabbitmq_restart.yml
|
||||
- include_tasks:
|
||||
file: rabbitmq_restart.yml
|
||||
apply:
|
||||
tags: rabbitmq-config
|
||||
when: rabbitmq_policy is changed
|
||||
tags:
|
||||
- rabbitmq-config
|
||||
|
||||
# This is being done because the rabbitctl command used by the module
|
||||
# is not very effective at returning proper status codes for failure
|
||||
|
Loading…
Reference in New Issue
Block a user