Allow override of rabbitmq config in kolla toolbox
Certain overrides for rabbitmq may need to be set for `rabbitmqctl` in kolla-toolbox aswell. This commit allows to override `rabbitmq-env.conf` and `erl_inetrc` in kolla-toolbox. Change-Id: Idef6adcf9700f75a2db503444a8de093ee21a9c5
This commit is contained in:
parent
13200ace33
commit
f8e3e169c3
@ -263,26 +263,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"
|
||||
|
3
ansible/roles/common/templates/erl_inetrc.j2
Normal file
3
ansible/roles/common/templates/erl_inetrc.j2
Normal file
@ -0,0 +1,3 @@
|
||||
{% if api_address_family == 'ipv6' %}
|
||||
{inet6,true}.
|
||||
{% endif %}
|
@ -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": [
|
||||
{
|
||||
|
2
ansible/roles/common/templates/rabbitmq-env.conf.j2
Normal file
2
ansible/roles/common/templates/rabbitmq-env.conf.j2
Normal 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
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added support to override rabbitmq config (``erl_inetrc`` and
|
||||
``rabbitmq-env.conf``) in the ``kolla-toolbox`` container.
|
Loading…
Reference in New Issue
Block a user