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 }}" with_dict: "{{ common_services }}"
- name: Copy rabbitmq-env.conf to kolla toolbox - name: Copy rabbitmq-env.conf to kolla toolbox
copy: template:
content: | src: "{{ item }}"
RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp"
export ERL_INETRC=/etc/rabbitmq/erl_inetrc
dest: "{{ node_config_directory }}/kolla-toolbox/rabbitmq-env.conf" dest: "{{ node_config_directory }}/kolla-toolbox/rabbitmq-env.conf"
mode: "0600" 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 become: true
when: when:
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host - common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
- enable_rabbitmq | bool - enable_rabbitmq | bool
- api_address_family == "ipv6"
- name: Copy rabbitmq erl_intr to kolla toolbox - name: Copy rabbitmq erl_inetrc to kolla toolbox
copy: template:
content: | src: "{{ item }}"
{inet6,true}.
dest: "{{ node_config_directory }}/kolla-toolbox/erl_inetrc" dest: "{{ node_config_directory }}/kolla-toolbox/erl_inetrc"
mode: "0600" mode: "0600"
become: true 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: when:
- common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host - common_services['kolla-toolbox'] | service_enabled_and_mapped_to_host
- enable_rabbitmq | bool - 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", "dest": "/var/lib/rabbitmq/.erlang.cookie",
"owner": "rabbitmq", "owner": "rabbitmq",
"perm": "0600" "perm": "0600"
}{% if api_address_family == 'ipv6' %}, },
{ {
"source": "{{ container_config_directory }}/rabbitmq-env.conf", "source": "{{ container_config_directory }}/rabbitmq-env.conf",
"dest": "/etc/rabbitmq/rabbitmq-env.conf", "dest": "/etc/rabbitmq/rabbitmq-env.conf",
@ -18,7 +18,7 @@
"dest": "/etc/rabbitmq/erl_inetrc", "dest": "/etc/rabbitmq/erl_inetrc",
"owner": "rabbitmq", "owner": "rabbitmq",
"perm": "0600" "perm": "0600"
}{% endif %}{% endif %} }{% endif %}
], ],
"permissions": [ "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.