Skip to content

Commit

Permalink
BC-8618 auto-enable rabbitmq feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Dec 27, 2024
1 parent 628c832 commit c67d967
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ansible/roles/dof_rabbitmq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,21 @@
when: RABBITMQ_SERVICE_MONITOR is undefined or RABBITMQ_SERVICE_MONITOR is defined and not RABBITMQ_SERVICE_MONITOR
tags:
- prometheus

- name: Enable all RabbitMQ feature flags in all pods
kubernetes.core.k8s_exec:
namespace: "{{ namespace }}" # Adjust namespace variable if needed
pod: "{{ item }}"
container: rabbitmq # Replace with your container name if not 'rabbitmq'
command:
- bash
- -c
- |
rabbitmqctl enable_feature_flag_all
loop: "{{ query('kubernetes.core.k8s_info', {'api_version': 'v1', 'kind': 'Pod', 'namespace': namespace, 'label_selectors': ['app.kubernetes.io/name=rabbitmq']}).resources | map(attribute='metadata.name') | list }}"
register: exec_results

- name: Display results of feature flag enablement
debug:
msg: "Pod: {{ item.item }} - {{ item.stdout }}"
with_items: "{{ exec_results.results }}"

0 comments on commit c67d967

Please sign in to comment.