From 71f24586debf556b35df702ce3113ae5b24a75ec Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 11 Jan 2022 09:10:06 +0000 Subject: [PATCH] rabbitmq: enable/disable prometheus plugin follow up Move new variables added in I4d694d6224c813285d228d6bc7eece5731db1078 to role defaults. Change-Id: Ie09a2dbae2701cb18fd1eb5bfab76e82f9920fb3 --- ansible/group_vars/all.yml | 8 -------- ansible/roles/rabbitmq/defaults/main.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index d2c56e296f..8f16694257 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -799,14 +799,6 @@ outward_rabbitmq_user: "openstack" rabbitmq_enable_tls: "no" # CA certificate bundle in RabbitMQ container. rabbitmq_cacert: "/etc/ssl/certs/{{ 'ca-certificates.crt' if kolla_base_distro in ['debian', 'ubuntu'] else 'ca-bundle.trust.crt' }}" -rabbitmq_enable_prometheus_plugin: "{{ enable_prometheus }}" -rabbitmq_plugins: - - name: "rabbitmq_management" - enabled: True - - name: "rabbitmq_prometheus" - enabled: "{{ rabbitmq_enable_prometheus_plugin | bool }}" - -rabbitmq_enabled_plugins: "{{ rabbitmq_plugins | selectattr('enabled', 'equalto', true) | list }}" #################### # Qdrouterd options diff --git a/ansible/roles/rabbitmq/defaults/main.yml b/ansible/roles/rabbitmq/defaults/main.yml index b10c333473..5ecd8c13bc 100644 --- a/ansible/roles/rabbitmq/defaults/main.yml +++ b/ansible/roles/rabbitmq/defaults/main.yml @@ -90,3 +90,15 @@ rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio rabbitmq_tls_options: {} # To avoid split-brain rabbitmq_cluster_partition_handling: "pause_minority" + +#################### +# Plugins +#################### +rabbitmq_enable_prometheus_plugin: "{{ enable_prometheus }}" +rabbitmq_plugins: + - name: "rabbitmq_management" + enabled: True + - name: "rabbitmq_prometheus" + enabled: "{{ rabbitmq_enable_prometheus_plugin | bool }}" + +rabbitmq_enabled_plugins: "{{ rabbitmq_plugins | selectattr('enabled', 'equalto', true) | list }}"