From 14482acb5f157a418e4b5dbe7c39a09cb2717718 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Thu, 2 Mar 2023 09:57:35 +0000 Subject: [PATCH] Remove RabbitMQ ha-all policy when not required With the addition of the variable `om_enable_rabbitmq_high_availability`, this feature in the upgrade task should be brought back. It is also now used in the deploy task. The `ha-all` policy is cleared only when `om_enable_rabbitmq_high_availability` is set to `false`. Change-Id: Ia056aa40e996b1f0fed43c0f672466c7e4a2f547 (cherry picked from commit c85b64d1589a515da2f3cf2dcc082d15df1d6edd) --- ansible/roles/rabbitmq/tasks/deploy.yml | 4 +++- ...ove-ha-all-policy-when-not-required-81dcf64542c4805f.yaml | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/rabbitmq-remove-ha-all-policy-when-not-required-81dcf64542c4805f.yaml diff --git a/ansible/roles/rabbitmq/tasks/deploy.yml b/ansible/roles/rabbitmq/tasks/deploy.yml index 91b3d501f7..371e0af339 100644 --- a/ansible/roles/rabbitmq/tasks/deploy.yml +++ b/ansible/roles/rabbitmq/tasks/deploy.yml @@ -1,6 +1,8 @@ --- - include_tasks: remove-ha-all-policy.yml - when: rabbitmq_remove_ha_all_policy | bool + when: + - not om_enable_rabbitmq_high_availability | bool + - rabbitmq_remove_ha_all_policy | bool - import_tasks: config.yml diff --git a/releasenotes/notes/rabbitmq-remove-ha-all-policy-when-not-required-81dcf64542c4805f.yaml b/releasenotes/notes/rabbitmq-remove-ha-all-policy-when-not-required-81dcf64542c4805f.yaml new file mode 100644 index 0000000000..fe8f6030ac --- /dev/null +++ b/releasenotes/notes/rabbitmq-remove-ha-all-policy-when-not-required-81dcf64542c4805f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + When upgrading or deploying RabbitMQ, the policy `ha-all` is cleared if + `om_enable_rabbitmq_high_availability` is set to `false`.