Add ability to add custom configuration for RabbitMQ

This implements a new variable  rabbitmq_custom_config  to
be able to place custom configuration to the rabbitmq.conf
e.g. to configure installed plugins

Change-Id: I952eefe646b00f60184f8d353f6f055bbdc4ac90
(cherry picked from commit e46cf7c988)
This commit is contained in:
Niklas Schwarz
2023-11-02 09:05:21 +01:00
committed by Christian Rohmann
parent 220a90cfda
commit d32e3865b2
4 changed files with 28 additions and 0 deletions

View File

@@ -287,6 +287,8 @@ rabbitmq_port_bindings:
tcp_listeners: tcp_listeners:
"0.0.0.0": 5672 "0.0.0.0": 5672
rabbitmq_additional_config: {}
rabbitmq_init_overrides: rabbitmq_init_overrides:
Service: Service:
LimitNOFILE: "{{ rabbitmq_ulimit }}" LimitNOFILE: "{{ rabbitmq_ulimit }}"

View File

@@ -34,3 +34,17 @@ between each OpenStack service and RabbitMQ.
Setting this variable to ``false`` disables SSL encryption between Setting this variable to ``false`` disables SSL encryption between
OpenStack services and RabbitMQ and configures all services to OpenStack services and RabbitMQ and configures all services to
use the plain text port, 5672. use the plain text port, 5672.
Add custom configuration to RabbitMQ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To add custom configuration, e.g. to configure installed plugins,
can be accomplished by defining a variable ``rabbitmq_additional_config``
and add you configuration as a block to this variable. Make sure to
not add redundent configuration
.. code-block:: yaml
rabbitmq_additional_config:
prometheus.tcp.port: 15680
prometheus.tcp.ip: 0.0.0.0

View File

@@ -0,0 +1,4 @@
---
features:
- Add ``rabbitmq_additional_config`` to be able to add additional
configuration e.g. to add configuration for plugins.

View File

@@ -74,3 +74,11 @@ management.ssl.fail_if_no_peer_cert = {{ rabbitmq_ssl_fail_if_no_peer_cert | low
management.tcp.ip = {{ rabbitmq_management_bind_address }} management.tcp.ip = {{ rabbitmq_management_bind_address }}
management.tcp.port = {{ rabbitmq_management_bind_tcp_port }} management.tcp.port = {{ rabbitmq_management_bind_tcp_port }}
{% endif %} {% endif %}
{% if rabbitmq_additional_config | length > 0 %}
# Custom configuration
{% for config_key, config_value in rabbitmq_additional_config.items() %}
{{ config_key }} = {{ config_value }}
{% endfor %}
{% endif %}