Add support for the apply_to parameter for policies
Policies were always applied to target `all` aspects and there was no way to have them target only e.g. exchanges. This can be important though, see [1]. This change enables the use of the apply_to parmeter via the existing variables while maintaining `all` to be the default. [1] https://www.rabbitmq.com/docs/parameters#how-policies-work Change-Id: I61d68c630599b8ef2382663e8a37fdc456435c11
This commit is contained in:
5
releasenotes/notes/applyToPolicies-f4cb13dac7ec82b0.yaml
Normal file
5
releasenotes/notes/applyToPolicies-f4cb13dac7ec82b0.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
RabbitMQ policies now support the `apply_to` parameter to e.g have a policy
|
||||||
|
target only classic_queues, exchanges, ...
|
||||||
@@ -80,6 +80,7 @@
|
|||||||
node: "rabbit@{{ ansible_facts['hostname'] }}"
|
node: "rabbit@{{ ansible_facts['hostname'] }}"
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
pattern: "{{ item.pattern }}"
|
pattern: "{{ item.pattern }}"
|
||||||
|
apply_to: "{{ item.apply_to | default(omit) }}"
|
||||||
priority: "{{ item.priority | default(0) }}"
|
priority: "{{ item.priority | default(0) }}"
|
||||||
state: "{{ item.state | default(omit) }}"
|
state: "{{ item.state | default(omit) }}"
|
||||||
tags: "{{ item.tags }}"
|
tags: "{{ item.tags }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user