diff --git a/defaults/main.yml b/defaults/main.yml index 779bf097..798b44e9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -261,6 +261,12 @@ rabbitmq_disable_non_tls_listeners: False # pattern: '^(event|metering|notifications)\.' # tags: "ha-sync-mode=automatic" # priority: 0 +# state:present +# If policy needs to be removed, provide `state: absent` +# - name: "HA" +# pattern: '^(?!(amq\.)|(.*_fanout_)|(reply_)).*' +# tags: "ha-mode=all" +# state: absent # rabbitmq_policies: [] rabbitmq_apply_openstack_policies: False diff --git a/tasks/rabbitmq_post_install.yml b/tasks/rabbitmq_post_install.yml index 40145d1d..29435cba 100644 --- a/tasks/rabbitmq_post_install.yml +++ b/tasks/rabbitmq_post_install.yml @@ -88,6 +88,7 @@ name: "{{ item.name }}" pattern: "{{ item.pattern }}" priority: "{{ item.priority | default(0) }}" + state: "{{ item.state | default(omit) }}" tags: "{{ item.tags }}" register: rabbitmq_policy loop: "{{ (rabbitmq_apply_openstack_policies | bool) | ternary(rabbitmq_openstack_policies + rabbitmq_policies, rabbitmq_policies) }}"