Merge "Allow to provide policy state"

This commit is contained in:
Zuul 2021-12-04 18:49:44 +00:00 committed by Gerrit Code Review
commit 34819a10ac
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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) }}"