Merge "Allow override of rabbitmq config in kolla toolbox"

This commit is contained in:
Zuul 2021-09-07 10:34:54 +00:00 committed by Gerrit Code Review
commit c48469d2ac
5 changed files with 25 additions and 12 deletions

View File

@ -275,26 +275,29 @@
with_dict: "{{ common_services }}"
- name: Copy rabbitmq-env.conf to kolla toolbox
copy:
content: |
RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp"
export ERL_INETRC=/etc/rabbitmq/erl_inetrc
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/kolla-toolbox/rabbitmq-env.conf"
mode: "0600"
with_first_found:
- "{{ node_custom_config }}/kolla-toolbox/{{ inventory_hostname }}/rabbitmq-env.conf"
- "{{ node_custom_config }}/kolla-toolbox/rabbitmq-env.conf"
- "rabbitmq-env.conf.j2"
become: true
when:
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
- enable_rabbitmq | bool
- api_address_family == "ipv6"
- name: Copy rabbitmq erl_intr to kolla toolbox
copy:
content: |
{inet6,true}.
- name: Copy rabbitmq erl_inetrc to kolla toolbox
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/kolla-toolbox/erl_inetrc"
mode: "0600"
become: true
with_first_found:
- "{{ node_custom_config }}/kolla-toolbox/{{ inventory_hostname }}/erl_inetrc"
- "{{ node_custom_config }}/kolla-toolbox/erl_inetrc"
- "erl_inetrc.j2"
when:
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
- enable_rabbitmq | bool
- api_address_family == "ipv6"

View File

@ -0,0 +1,3 @@
{% if api_address_family == 'ipv6' %}
{inet6,true}.
{% endif %}

View File

@ -6,7 +6,7 @@
"dest": "/var/lib/rabbitmq/.erlang.cookie",
"owner": "rabbitmq",
"perm": "0600"
}{% if api_address_family == 'ipv6' %},
},
{
"source": "{{ container_config_directory }}/rabbitmq-env.conf",
"dest": "/etc/rabbitmq/rabbitmq-env.conf",
@ -18,7 +18,7 @@
"dest": "/etc/rabbitmq/erl_inetrc",
"owner": "rabbitmq",
"perm": "0600"
}{% endif %}{% endif %}
}{% endif %}
],
"permissions": [
{

View File

@ -0,0 +1,2 @@
RABBITMQ_CTL_ERL_ARGS="{% if api_address_family == 'ipv6' %}-proto_dist inet6_tcp {% endif %}"
export ERL_INETRC=/etc/rabbitmq/erl_inetrc

View File

@ -0,0 +1,5 @@
---
features:
- |
Added support to override rabbitmq config (``erl_inetrc`` and
``rabbitmq-env.conf``) in the ``kolla-toolbox`` container.