Merge "Fix rabbitmq reconfigure, simplify role"
This commit is contained in:
commit
ed4133b41f
@ -3,8 +3,6 @@
|
|||||||
vars:
|
vars:
|
||||||
service_name: "rabbitmq"
|
service_name: "rabbitmq"
|
||||||
service: "{{ rabbitmq_services[service_name] }}"
|
service: "{{ rabbitmq_services[service_name] }}"
|
||||||
config_json: "{{ rabbitmq_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
||||||
rabbitmq_container: "{{ check_rabbitmq_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
||||||
become: true
|
become: true
|
||||||
kolla_docker:
|
kolla_docker:
|
||||||
action: "recreate_or_restart_container"
|
action: "recreate_or_restart_container"
|
||||||
@ -17,10 +15,6 @@
|
|||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname == groups[service.group]|first
|
- inventory_hostname == groups[service.group]|first
|
||||||
- service.enabled | bool
|
|
||||||
- config_json.changed | bool
|
|
||||||
or rabbitmq_confs.changed | bool
|
|
||||||
or rabbitmq_container.changed | bool
|
|
||||||
notify:
|
notify:
|
||||||
- Waiting for rabbitmq to start on first node
|
- Waiting for rabbitmq to start on first node
|
||||||
|
|
||||||
@ -36,8 +30,6 @@
|
|||||||
vars:
|
vars:
|
||||||
service_name: "rabbitmq"
|
service_name: "rabbitmq"
|
||||||
service: "{{ rabbitmq_services[service_name] }}"
|
service: "{{ rabbitmq_services[service_name] }}"
|
||||||
config_json: "{{ rabbitmq_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
||||||
rabbitmq_container: "{{ check_rabbitmq_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
||||||
become: true
|
become: true
|
||||||
kolla_docker:
|
kolla_docker:
|
||||||
action: "recreate_or_restart_container"
|
action: "recreate_or_restart_container"
|
||||||
@ -50,9 +42,3 @@
|
|||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname != groups[service.group]|first
|
- inventory_hostname != groups[service.group]|first
|
||||||
- service.enabled | bool
|
|
||||||
- config_json.changed | bool
|
|
||||||
or rabbitmq_env_conf.changed | bool
|
|
||||||
or rabbitmq_config.changed | bool
|
|
||||||
or rabbitmq_definitions.changed | bool
|
|
||||||
or rabbitmq_container.changed | bool
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
dest: "{{ node_config_directory }}/{{ project_name }}/config.json"
|
dest: "{{ node_config_directory }}/{{ project_name }}/config.json"
|
||||||
mode: "0770"
|
mode: "0770"
|
||||||
become: true
|
become: true
|
||||||
register: rabbitmq_config_jsons
|
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[item.value.group]
|
||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
@ -39,7 +38,6 @@
|
|||||||
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq-env.conf"
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq-env.conf"
|
||||||
- "{{ node_custom_config }}/rabbitmq/rabbitmq-env.conf"
|
- "{{ node_custom_config }}/rabbitmq/rabbitmq-env.conf"
|
||||||
- "rabbitmq-env.conf.j2"
|
- "rabbitmq-env.conf.j2"
|
||||||
register: rabbitmq_env_conf
|
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
@ -60,7 +58,6 @@
|
|||||||
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq.conf"
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/rabbitmq.conf"
|
||||||
- "{{ node_custom_config }}/rabbitmq/rabbitmq.conf"
|
- "{{ node_custom_config }}/rabbitmq/rabbitmq.conf"
|
||||||
- "rabbitmq.conf.j2"
|
- "rabbitmq.conf.j2"
|
||||||
register: rabbitmq_config
|
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
- service.enabled | bool
|
- service.enabled | bool
|
||||||
@ -80,7 +77,6 @@
|
|||||||
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/definitions.json"
|
- "{{ node_custom_config }}/rabbitmq/{{ inventory_hostname }}/definitions.json"
|
||||||
- "{{ node_custom_config }}/rabbitmq/definitions.json"
|
- "{{ node_custom_config }}/rabbitmq/definitions.json"
|
||||||
- "definitions.json.j2"
|
- "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
|
||||||
@ -98,7 +94,6 @@
|
|||||||
volumes: "{{ item.value.volumes }}"
|
volumes: "{{ item.value.volumes }}"
|
||||||
environment: "{{ item.value.environment }}"
|
environment: "{{ item.value.environment }}"
|
||||||
dimensions: "{{ item.value.dimensions }}"
|
dimensions: "{{ item.value.dimensions }}"
|
||||||
register: check_rabbitmq_containers
|
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[item.value.group]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user