diff --git a/tasks/rabbitmq_post_install.yml b/tasks/rabbitmq_post_install.yml index 4f45a60e..40145d1d 100644 --- a/tasks/rabbitmq_post_install.yml +++ b/tasks/rabbitmq_post_install.yml @@ -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