Explicitly use rabbitmq collection
Since we've switched to ansible 2.10 we should explicitly use modules provided by rabbitmq collection. Depends-On: https://review.opendev.org/755484 Change-Id: I1a71b123f5524f194cac2388d59b1879752b5cd7
This commit is contained in:
committed by
Jonathan Rosser
parent
29236a5821
commit
0f8215e5ad
@@ -65,7 +65,7 @@
|
|||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: Configure rabbitmq plugins (ansible 2.10.x with rabbitmq collection)
|
- name: Configure rabbitmq plugins (ansible 2.10.x with rabbitmq collection)
|
||||||
rabbitmq_plugin:
|
community.rabbitmq.rabbitmq_plugin:
|
||||||
names: "{{ item.name }}"
|
names: "{{ item.name }}"
|
||||||
state: "{{ item.state }}"
|
state: "{{ item.state }}"
|
||||||
broker_state: offline
|
broker_state: offline
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
when: ansible_version.full is version('2.10', '>')
|
when: ansible_version.full is version('2.10', '>')
|
||||||
|
|
||||||
- name: Configure rabbitmq plugins (ansible 2.9.x)
|
- name: Configure rabbitmq plugins (ansible 2.9.x)
|
||||||
rabbitmq_plugin:
|
community.rabbitmq.rabbitmq_plugin:
|
||||||
names: "{{ item.name }}"
|
names: "{{ item.name }}"
|
||||||
state: "{{ item.state }}"
|
state: "{{ item.state }}"
|
||||||
with_items: "{{ rabbitmq_plugins }}"
|
with_items: "{{ rabbitmq_plugins }}"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
when: rabbit_config is changed or rabbitmq_plugin is changed or cookie_set is changed or rabbitmq_upgrade | bool
|
when: rabbit_config is changed or rabbitmq_plugin is changed or cookie_set is changed or rabbitmq_upgrade | bool
|
||||||
|
|
||||||
- name: Apply rabbitmq policies
|
- name: Apply rabbitmq policies
|
||||||
rabbitmq_policy:
|
community.rabbitmq.rabbitmq_policy:
|
||||||
node: "rabbit@{{ ansible_hostname }}"
|
node: "rabbit@{{ ansible_hostname }}"
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
pattern: "{{ item.pattern }}"
|
pattern: "{{ item.pattern }}"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
# to fix this issue this task being being done in two parts to ensure
|
# to fix this issue this task being being done in two parts to ensure
|
||||||
# that the "guest" user is eradicated.
|
# that the "guest" user is eradicated.
|
||||||
- name: Ensure default rabbitmq guest user is removed
|
- name: Ensure default rabbitmq guest user is removed
|
||||||
rabbitmq_user:
|
community.rabbitmq.rabbitmq_user:
|
||||||
node: "rabbit@{{ ansible_hostname }}"
|
node: "rabbit@{{ ansible_hostname }}"
|
||||||
user: guest
|
user: guest
|
||||||
state: absent
|
state: absent
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
- rabbitmq-user
|
- rabbitmq-user
|
||||||
|
|
||||||
- name: Ensure default rabbitmq guest user is removed
|
- name: Ensure default rabbitmq guest user is removed
|
||||||
rabbitmq_user:
|
community.rabbitmq.rabbitmq_user:
|
||||||
node: "rabbit@{{ ansible_hostname }}"
|
node: "rabbit@{{ ansible_hostname }}"
|
||||||
user: guest
|
user: guest
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
Reference in New Issue
Block a user