Make Rabbitmq config files overridable
Rabbitmq config files can be overrided in node_custom_config directory. Change-Id: Id724b44a3edd951fa8b06c9f2c347e9ed8c5ffd9 Closes-Bug: #1674446
This commit is contained in:
parent
404d0b1c12
commit
0729472256
@ -52,5 +52,7 @@
|
|||||||
- inventory_hostname != groups[service.group]|first
|
- inventory_hostname != groups[service.group]|first
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
- config_json.changed | bool
|
- config_json.changed | bool
|
||||||
or rabbitmq_confs.changed | bool
|
or rabbitmq_env_conf.changed | bool
|
||||||
|
or rabbitmq_config.changed | bool
|
||||||
|
or rabbitmq_definitions.changed | bool
|
||||||
or rabbitmq_container.changed | bool
|
or rabbitmq_container.changed | bool
|
||||||
|
@ -27,22 +27,63 @@
|
|||||||
- Restart rabbitmq container (first node)
|
- Restart rabbitmq container (first node)
|
||||||
- Restart rabbitmq container (rest of nodes)
|
- Restart rabbitmq container (rest of nodes)
|
||||||
|
|
||||||
- name: Copying over rabbitmq configs
|
- name: Copying over rabbitmq-env.conf
|
||||||
|
become: true
|
||||||
vars:
|
vars:
|
||||||
service: "{{ rabbitmq_services['rabbitmq'] }}"
|
service: "{{ rabbitmq_services['rabbitmq'] }}"
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}"
|
||||||
dest: "{{ node_config_directory }}/{{ project_name }}/{{ item }}"
|
dest: "{{ node_config_directory }}/{{ project_name }}/rabbitmq-env.conf"
|
||||||
mode: "0770"
|
mode: "0770"
|
||||||
become: true
|
with_first_found:
|
||||||
register: rabbitmq_confs
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq-env.conf"
|
||||||
|
- "{{ node_custom_config }}/rabbitmq/rabbitmq-env.conf"
|
||||||
|
- "rabbitmq-env.conf.j2"
|
||||||
|
register: rabbitmq_env_conf
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[service.group]
|
||||||
|
- service.enabled | bool
|
||||||
|
notify:
|
||||||
|
- Restart rabbitmq container (first node)
|
||||||
|
- Restart rabbitmq container (rest of nodes)
|
||||||
|
|
||||||
|
|
||||||
|
- name: Copying over rabbitmq.conf
|
||||||
|
become: true
|
||||||
|
vars:
|
||||||
|
service: "{{ rabbitmq_services['rabbitmq'] }}"
|
||||||
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ node_config_directory }}/{{ project_name }}/rabbitmq.conf"
|
||||||
|
mode: "0770"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq.conf"
|
||||||
|
- "{{ node_custom_config }}/rabbitmq/rabbitmq.conf"
|
||||||
|
- "rabbitmq.conf.j2"
|
||||||
|
register: rabbitmq_config
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[service.group]
|
||||||
|
- service.enabled | bool
|
||||||
|
notify:
|
||||||
|
- Restart rabbitmq container (first node)
|
||||||
|
- Restart rabbitmq container (rest of nodes)
|
||||||
|
|
||||||
|
- name: Copying over definitions.json
|
||||||
|
become: true
|
||||||
|
vars:
|
||||||
|
service: "{{ rabbitmq_services['rabbitmq'] }}"
|
||||||
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "{{ node_config_directory }}/{{ project_name }}/definitions.json"
|
||||||
|
mode: "0770"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/definitions.json"
|
||||||
|
- "{{ node_custom_config }}/rabbitmq/definitions.json"
|
||||||
|
- "definitions.json.j2"
|
||||||
|
register: rabbitmq_definitions
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
with_items:
|
|
||||||
- "rabbitmq-env.conf"
|
|
||||||
- "rabbitmq.conf"
|
|
||||||
- "definitions.json"
|
|
||||||
notify:
|
notify:
|
||||||
- Restart rabbitmq container (first node)
|
- Restart rabbitmq container (first node)
|
||||||
- Restart rabbitmq container (rest of nodes)
|
- Restart rabbitmq container (rest of nodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user