diff --git a/tasks/rabbitmq_post_install.yml b/tasks/rabbitmq_post_install.yml index 1c0230a4..b69bc501 100644 --- a/tasks/rabbitmq_post_install.yml +++ b/tasks/rabbitmq_post_install.yml @@ -24,7 +24,7 @@ - rabbitmq-config - name: Create rabbitmq config - register: rabbit_config_changed + register: rabbit_config template: src: "{{ item.src }}" dest: "{{ item.dest }}" @@ -62,10 +62,6 @@ # don't trigger ANSIBLE0016 - skip_ansible_lint -- include: rabbitmq_restart.yml - static: no - when: rabbit_config_changed|changed or rabbitmq_plugin|changed or rabbitmq_queue_mirror|changed - - name: Configure rabbitmq plugins rabbitmq_plugin: names: "{{ item.name }}" @@ -82,12 +78,16 @@ pattern: "{{ item.pattern }}" priority: "{{ item.priority | default(0) }}" tags: "{{ item.tags }}" - register: rabbitmq_queue_mirror + register: rabbitmq_policy with_items: "{{ rabbitmq_policies }}" tags: - rabbitmq-config - rabbitmq-cluster +- include: rabbitmq_restart.yml + static: no + when: rabbit_config|changed or rabbitmq_plugin|changed or rabbitmq_policy|changed + # This is being done because the rabbitctl command used by the module # is not very effective at returning proper status codes for failure # and the module does not error detection. until we can go upstream