Remove do_reconfigure.yml file for all roles
do_reconfigure.yml is introduced to use serial directive. But we use it in wrong. Now serial has moved to playbook file. So it is time to remove the do_reconfigure.yml file Closes-Bug: #1628152 Change-Id: I8d42d27e6bc302a0e575b0353956eaef9b2ca9fd
This commit is contained in:
parent
911dfe4ef7
commit
fa856556d5
@ -1,79 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: aodh_api, group: aodh-api }
|
|
||||||
- { name: aodh_listener, group: aodh-listener }
|
|
||||||
- { name: aodh_evaluator, group: aodh-evaluator }
|
|
||||||
- { name: aodh_notifier, group: aodh-notifier }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: aodh_api, group: aodh-api }
|
|
||||||
- { name: aodh_listener, group: aodh-listener }
|
|
||||||
- { name: aodh_evaluator, group: aodh-evaluator }
|
|
||||||
- { name: aodh_notifier, group: aodh-notifier }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: aodh_api, group: aodh-api }
|
|
||||||
- { name: aodh_listener, group: aodh-listener }
|
|
||||||
- { name: aodh_evaluator, group: aodh-evaluator }
|
|
||||||
- { name: aodh_notifier, group: aodh-notifier }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: aodh_api, group: aodh-api },
|
|
||||||
{ name: aodh_listener, group: aodh-listener },
|
|
||||||
{ name: aodh_evaluator, group: aodh-evaluator },
|
|
||||||
{ name: aodh_notifier, group: aodh-notifier }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: aodh_api, group: aodh-api },
|
|
||||||
{ name: aodh_listener, group: aodh-listener },
|
|
||||||
{ name: aodh_evaluator, group: aodh-evaluator },
|
|
||||||
{ name: aodh_notifier, group: aodh-notifier }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,6 +1,79 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['aodh-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['aodh-listener']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['aodh-evaluator']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['aodh-notifier']
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: aodh_api, group: aodh-api }
|
||||||
|
- { name: aodh_listener, group: aodh-listener }
|
||||||
|
- { name: aodh_evaluator, group: aodh-evaluator }
|
||||||
|
- { name: aodh_notifier, group: aodh-notifier }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: aodh_api, group: aodh-api }
|
||||||
|
- { name: aodh_listener, group: aodh-listener }
|
||||||
|
- { name: aodh_evaluator, group: aodh-evaluator }
|
||||||
|
- { name: aodh_notifier, group: aodh-notifier }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: aodh_api, group: aodh-api }
|
||||||
|
- { name: aodh_listener, group: aodh-listener }
|
||||||
|
- { name: aodh_evaluator, group: aodh-evaluator }
|
||||||
|
- { name: aodh_notifier, group: aodh-notifier }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: aodh_api, group: aodh-api },
|
||||||
|
{ name: aodh_listener, group: aodh-listener },
|
||||||
|
{ name: aodh_evaluator, group: aodh-evaluator },
|
||||||
|
{ name: aodh_notifier, group: aodh-notifier }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: aodh_api, group: aodh-api },
|
||||||
|
{ name: aodh_listener, group: aodh-listener },
|
||||||
|
{ name: aodh_evaluator, group: aodh-evaluator },
|
||||||
|
{ name: aodh_notifier, group: aodh-notifier }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: barbican_api, group: barbican-api }
|
|
||||||
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
|
||||||
- { name: barbican_worker, group: barbican-worker }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: barbican_api, group: barbican-api }
|
|
||||||
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
|
||||||
- { name: barbican_worker, group: barbican-worker }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: barbican_api, group: barbican-api }
|
|
||||||
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
|
||||||
- { name: barbican_worker, group: barbican-worker }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: barbican_api, group: barbican-api },
|
|
||||||
{ name: barbican_keystone_listener, group: barbican-keystone-listener },
|
|
||||||
{ name: barbican_worker, group: barbican-worker }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: barbican_api, group: barbican-api },
|
|
||||||
{ name: barbican_keystone_listener, group: barbican-keystone-listener },
|
|
||||||
{ name: barbican_worker, group: barbican-worker }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,74 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['barbican-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['barbican-keystone-listener']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['barbican-worker']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: barbican_api, group: barbican-api }
|
||||||
|
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
||||||
|
- { name: barbican_worker, group: barbican-worker }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: barbican_api, group: barbican-api }
|
||||||
|
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
||||||
|
- { name: barbican_worker, group: barbican-worker }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: barbican_api, group: barbican-api }
|
||||||
|
- { name: barbican_keystone_listener, group: barbican-keystone-listener }
|
||||||
|
- { name: barbican_worker, group: barbican-worker }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: barbican_api, group: barbican-api },
|
||||||
|
{ name: barbican_keystone_listener, group: barbican-keystone-listener },
|
||||||
|
{ name: barbican_worker, group: barbican-worker }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: barbican_api, group: barbican-api },
|
||||||
|
{ name: barbican_keystone_listener, group: barbican-keystone-listener },
|
||||||
|
{ name: barbican_worker, group: barbican-worker }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceilometer_api, group: ceilometer-api }
|
|
||||||
- { name: ceilometer_central, group: ceilometer-central }
|
|
||||||
- { name: ceilometer_notification, group: ceilometer-notification }
|
|
||||||
- { name: ceilometer_collector, group: ceilometer-collector }
|
|
||||||
- { name: ceilometer_compute, group: ceilometer-compute }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceilometer_api, group: ceilometer-api }
|
|
||||||
- { name: ceilometer_central, group: ceilometer-central }
|
|
||||||
- { name: ceilometer_notification, group: ceilometer-notification }
|
|
||||||
- { name: ceilometer_collector, group: ceilometer-collector }
|
|
||||||
- { name: ceilometer_compute, group: ceilometer-compute }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceilometer_api, group: ceilometer-api }
|
|
||||||
- { name: ceilometer_central, group: ceilometer-central }
|
|
||||||
- { name: ceilometer_notification, group: ceilometer-notification }
|
|
||||||
- { name: ceilometer_collector, group: ceilometer-collector }
|
|
||||||
- { name: ceilometer_compute, group: ceilometer-compute }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ceilometer_api, group: ceilometer-api },
|
|
||||||
{ name: ceilometer_central, group: ceilometer-central },
|
|
||||||
{ name: ceilometer_notification, group: ceilometer-notification },
|
|
||||||
{ name: ceilometer_collector, group: ceilometer-collector },
|
|
||||||
{ name: ceilometer_compute, group: ceilometer-compute }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ceilometer_api, group: ceilometer-api },
|
|
||||||
{ name: ceilometer_central, group: ceilometer-central },
|
|
||||||
{ name: ceilometer_notification, group: ceilometer-notification },
|
|
||||||
{ name: ceilometer_collector, group: ceilometer-collector },
|
|
||||||
{ name: ceilometer_compute, group: ceilometer-compute }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,7 +1,84 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['ceilometer-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['ceilometer-central']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['ceilometer-notification']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['ceilometer-collector']
|
register: container_state
|
||||||
or inventory_hostname in groups['ceilometer-compute']
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceilometer_api, group: ceilometer-api }
|
||||||
|
- { name: ceilometer_central, group: ceilometer-central }
|
||||||
|
- { name: ceilometer_notification, group: ceilometer-notification }
|
||||||
|
- { name: ceilometer_collector, group: ceilometer-collector }
|
||||||
|
- { name: ceilometer_compute, group: ceilometer-compute }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceilometer_api, group: ceilometer-api }
|
||||||
|
- { name: ceilometer_central, group: ceilometer-central }
|
||||||
|
- { name: ceilometer_notification, group: ceilometer-notification }
|
||||||
|
- { name: ceilometer_collector, group: ceilometer-collector }
|
||||||
|
- { name: ceilometer_compute, group: ceilometer-compute }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceilometer_api, group: ceilometer-api }
|
||||||
|
- { name: ceilometer_central, group: ceilometer-central }
|
||||||
|
- { name: ceilometer_notification, group: ceilometer-notification }
|
||||||
|
- { name: ceilometer_collector, group: ceilometer-collector }
|
||||||
|
- { name: ceilometer_compute, group: ceilometer-compute }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ceilometer_api, group: ceilometer-api },
|
||||||
|
{ name: ceilometer_central, group: ceilometer-central },
|
||||||
|
{ name: ceilometer_notification, group: ceilometer-notification },
|
||||||
|
{ name: ceilometer_collector, group: ceilometer-collector },
|
||||||
|
{ name: ceilometer_compute, group: ceilometer-compute }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ceilometer_api, group: ceilometer-api },
|
||||||
|
{ name: ceilometer_central, group: ceilometer-central },
|
||||||
|
{ name: ceilometer_notification, group: ceilometer-notification },
|
||||||
|
{ name: ceilometer_collector, group: ceilometer-collector },
|
||||||
|
{ name: ceilometer_compute, group: ceilometer-compute }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,214 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the ceph_mon container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: ceph_mon_container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_mon, group: ceph-mon }
|
|
||||||
|
|
||||||
- name: Looking up OSDs for Ceph
|
|
||||||
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
|
|
||||||
-m find_disks
|
|
||||||
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'"
|
|
||||||
register: osd_lookup
|
|
||||||
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
||||||
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'
|
|
||||||
when: inventory_hostname in groups['ceph-osd']
|
|
||||||
|
|
||||||
- name: Reading data from variable
|
|
||||||
set_fact:
|
|
||||||
osds: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
|
||||||
when: inventory_hostname in groups['ceph-osd']
|
|
||||||
|
|
||||||
- name: Gathering OSD IDs
|
|
||||||
command: "cat /var/lib/ceph/osd/{{ item['fs_uuid'] }}/whoami"
|
|
||||||
with_items: "{{ osds }}"
|
|
||||||
register: osd_ids
|
|
||||||
changed_when: False
|
|
||||||
failed_when: osd_ids.rc != 0
|
|
||||||
when: inventory_hostname in groups['ceph-osd']
|
|
||||||
|
|
||||||
- name: Ensuring the ceph_osd container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_osd_{{ item.stdout }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: ceph_osd_container_state
|
|
||||||
failed_when: ceph_osd_container_state.Running == false
|
|
||||||
when: inventory_hostname in groups['ceph-osd']
|
|
||||||
with_items: "{{ osd_ids.results }}"
|
|
||||||
|
|
||||||
- name: Ensuring the ceph_rgw container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: ceph_rgw_container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when:
|
|
||||||
- enable_ceph_rgw | bool
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_rgw, group: ceph-rgw }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs in ceph_mon container
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: ceph_mon_check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_mon, group: ceph-mon }
|
|
||||||
|
|
||||||
- name: Check the configs in the ceph_osd container
|
|
||||||
command: docker exec ceph_osd_{{ item.stdout }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: ceph_osd_check_results
|
|
||||||
with_items: "{{ osd_ids.results }}"
|
|
||||||
when: inventory_hostname in groups['ceph-osd']
|
|
||||||
|
|
||||||
- name: Check the configs in ceph_rgw container
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: ceph_rgw_check_results
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
- enable_ceph_rgw | bool
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_rgw, group: ceph-rgw}
|
|
||||||
|
|
||||||
- name: Containers config strategy for ceph_mon container
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: ceph_mon_container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_mon, group: ceph-mon }
|
|
||||||
|
|
||||||
- name: Containers config strategy for the ceph_osd containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_osd_{{ item.stdout }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: ceph_osd_container_envs
|
|
||||||
with_items: "{{ osd_ids.results }}"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-osd']
|
|
||||||
- osds
|
|
||||||
|
|
||||||
- name: Containers config strategy for ceph_rgw container
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: ceph_rgw_container_envs
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
- enable_ceph_rgw | bool
|
|
||||||
with_items:
|
|
||||||
- { name: ceph_rgw, group: ceph-rgw }
|
|
||||||
|
|
||||||
- name: Remove the ceph_mon container
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_ceph_mon_container
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ceph_mon, group: ceph-mon }]
|
|
||||||
- "{{ ceph_mon_container_envs.results }}"
|
|
||||||
- "{{ ceph_mon_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Remove the ceph_osd containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_osd_{{ item.0.stdout }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_ceph_osd_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-osd']
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- osds
|
|
||||||
with_together:
|
|
||||||
- "{{ osd_ids.results }}"
|
|
||||||
- "{{ ceph_osd_container_envs.results }}"
|
|
||||||
- "{{ ceph_osd_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Remove the ceph_rgw container
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_ceph_rgw_container
|
|
||||||
when:
|
|
||||||
- enable_ceph_rgw | bool
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ceph_rgw, group: ceph-rgw }]
|
|
||||||
- "{{ ceph_rgw_container_envs.results }}"
|
|
||||||
- "{{ ceph_rgw_check_results.results }}"
|
|
||||||
|
|
||||||
- include: start_mons.yml
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-mon']
|
|
||||||
- remove_ceph_mon_container.changed
|
|
||||||
|
|
||||||
- include: start_osds.yml
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-osd']
|
|
||||||
- remove_ceph_osd_containers.changed
|
|
||||||
|
|
||||||
- include: start_rgws.yml
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-rgw']
|
|
||||||
- remove_ceph_rgw_container.changed
|
|
||||||
|
|
||||||
- name: Restart the ceph_mon container
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_mon"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-mon']
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[1]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- "{{ ceph_mon_container_envs.results }}"
|
|
||||||
- "{{ ceph_mon_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Restart the ceph_osd container
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_osd_{{ item.0.stdout }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['ceph-osd']
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- osds
|
|
||||||
with_together:
|
|
||||||
- "{{ osd_ids.results }}"
|
|
||||||
- "{{ ceph_osd_container_envs.results }}"
|
|
||||||
- "{{ ceph_osd_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Restart the ceph_rgw container
|
|
||||||
kolla_docker:
|
|
||||||
name: "ceph_rgw"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- enable_ceph_rgw | bool
|
|
||||||
- inventory_hostname in groups['ceph-rgw']
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[1]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- "{{ ceph_rgw_container_envs.results }}"
|
|
||||||
- "{{ ceph_rgw_check_results.results }}"
|
|
@ -1,5 +1,214 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the ceph_mon container is up
|
||||||
when: inventory_hostname in groups['ceph-mon']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['ceph-rgw']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['ceph-osd']
|
action: "get_container_state"
|
||||||
|
register: ceph_mon_container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_mon, group: ceph-mon }
|
||||||
|
|
||||||
|
- name: Looking up OSDs for Ceph
|
||||||
|
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
|
||||||
|
-m find_disks
|
||||||
|
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'"
|
||||||
|
register: osd_lookup
|
||||||
|
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
|
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'
|
||||||
|
when: inventory_hostname in groups['ceph-osd']
|
||||||
|
|
||||||
|
- name: Reading data from variable
|
||||||
|
set_fact:
|
||||||
|
osds: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
||||||
|
when: inventory_hostname in groups['ceph-osd']
|
||||||
|
|
||||||
|
- name: Gathering OSD IDs
|
||||||
|
command: "cat /var/lib/ceph/osd/{{ item['fs_uuid'] }}/whoami"
|
||||||
|
with_items: "{{ osds }}"
|
||||||
|
register: osd_ids
|
||||||
|
changed_when: False
|
||||||
|
failed_when: osd_ids.rc != 0
|
||||||
|
when: inventory_hostname in groups['ceph-osd']
|
||||||
|
|
||||||
|
- name: Ensuring the ceph_osd container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_osd_{{ item.stdout }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: ceph_osd_container_state
|
||||||
|
failed_when: ceph_osd_container_state.Running == false
|
||||||
|
when: inventory_hostname in groups['ceph-osd']
|
||||||
|
with_items: "{{ osd_ids.results }}"
|
||||||
|
|
||||||
|
- name: Ensuring the ceph_rgw container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: ceph_rgw_container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when:
|
||||||
|
- enable_ceph_rgw | bool
|
||||||
|
- inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_rgw, group: ceph-rgw }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs in ceph_mon container
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: ceph_mon_check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_mon, group: ceph-mon }
|
||||||
|
|
||||||
|
- name: Check the configs in the ceph_osd container
|
||||||
|
command: docker exec ceph_osd_{{ item.stdout }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: ceph_osd_check_results
|
||||||
|
with_items: "{{ osd_ids.results }}"
|
||||||
|
when: inventory_hostname in groups['ceph-osd']
|
||||||
|
|
||||||
|
- name: Check the configs in ceph_rgw container
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: ceph_rgw_check_results
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item.group]
|
||||||
|
- enable_ceph_rgw | bool
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_rgw, group: ceph-rgw}
|
||||||
|
|
||||||
|
- name: Containers config strategy for ceph_mon container
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: ceph_mon_container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_mon, group: ceph-mon }
|
||||||
|
|
||||||
|
- name: Containers config strategy for the ceph_osd containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_osd_{{ item.stdout }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: ceph_osd_container_envs
|
||||||
|
with_items: "{{ osd_ids.results }}"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-osd']
|
||||||
|
- osds
|
||||||
|
|
||||||
|
- name: Containers config strategy for ceph_rgw container
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: ceph_rgw_container_envs
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item.group]
|
||||||
|
- enable_ceph_rgw | bool
|
||||||
|
with_items:
|
||||||
|
- { name: ceph_rgw, group: ceph-rgw }
|
||||||
|
|
||||||
|
- name: Remove the ceph_mon container
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_ceph_mon_container
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ceph_mon, group: ceph-mon }]
|
||||||
|
- "{{ ceph_mon_container_envs.results }}"
|
||||||
|
- "{{ ceph_mon_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Remove the ceph_osd containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_osd_{{ item.0.stdout }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_ceph_osd_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-osd']
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- osds
|
||||||
|
with_together:
|
||||||
|
- "{{ osd_ids.results }}"
|
||||||
|
- "{{ ceph_osd_container_envs.results }}"
|
||||||
|
- "{{ ceph_osd_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Remove the ceph_rgw container
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_ceph_rgw_container
|
||||||
|
when:
|
||||||
|
- enable_ceph_rgw | bool
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ceph_rgw, group: ceph-rgw }]
|
||||||
|
- "{{ ceph_rgw_container_envs.results }}"
|
||||||
|
- "{{ ceph_rgw_check_results.results }}"
|
||||||
|
|
||||||
|
- include: start_mons.yml
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-mon']
|
||||||
|
- remove_ceph_mon_container.changed
|
||||||
|
|
||||||
|
- include: start_osds.yml
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-osd']
|
||||||
|
- remove_ceph_osd_containers.changed
|
||||||
|
|
||||||
|
- include: start_rgws.yml
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-rgw']
|
||||||
|
- remove_ceph_rgw_container.changed
|
||||||
|
|
||||||
|
- name: Restart the ceph_mon container
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_mon"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-mon']
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[1]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- "{{ ceph_mon_container_envs.results }}"
|
||||||
|
- "{{ ceph_mon_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Restart the ceph_osd container
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_osd_{{ item.0.stdout }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['ceph-osd']
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- osds
|
||||||
|
with_together:
|
||||||
|
- "{{ osd_ids.results }}"
|
||||||
|
- "{{ ceph_osd_container_envs.results }}"
|
||||||
|
- "{{ ceph_osd_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Restart the ceph_rgw container
|
||||||
|
kolla_docker:
|
||||||
|
name: "ceph_rgw"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- enable_ceph_rgw | bool
|
||||||
|
- inventory_hostname in groups['ceph-rgw']
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[1]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- "{{ ceph_rgw_container_envs.results }}"
|
||||||
|
- "{{ ceph_rgw_check_results.results }}"
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cinder_api, group: cinder-api }
|
|
||||||
- { name: cinder_scheduler, group: cinder-scheduler }
|
|
||||||
- { name: cinder_volume, group: cinder-volume }
|
|
||||||
- { name: cinder_backup, group: cinder-backup }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cinder_api, group: cinder-api }
|
|
||||||
- { name: cinder_scheduler, group: cinder-scheduler }
|
|
||||||
- { name: cinder_volume, group: cinder-volume }
|
|
||||||
- { name: cinder_backup, group: cinder-backup }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cinder_api, group: cinder-api }
|
|
||||||
- { name: cinder_scheduler, group: cinder-scheduler }
|
|
||||||
- { name: cinder_volume, group: cinder-volume }
|
|
||||||
- { name: cinder_backup, group: cinder-backup }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: cinder_api, group: cinder-api },
|
|
||||||
{ name: cinder_scheduler, group: cinder-scheduler },
|
|
||||||
{ name: cinder_volume, group: cinder-volume },
|
|
||||||
{ name: cinder_backup, group: cinder-backup }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: cinder_api, group: cinder-api },
|
|
||||||
{ name: cinder_scheduler, group: cinder-scheduler },
|
|
||||||
{ name: cinder_volume, group: cinder-volume },
|
|
||||||
{ name: cinder_backup, group: cinder-backup }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,6 +1,79 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['cinder-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['cinder-scheduler']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['cinder-volume']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['cinder-backup']
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cinder_api, group: cinder-api }
|
||||||
|
- { name: cinder_scheduler, group: cinder-scheduler }
|
||||||
|
- { name: cinder_volume, group: cinder-volume }
|
||||||
|
- { name: cinder_backup, group: cinder-backup }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cinder_api, group: cinder-api }
|
||||||
|
- { name: cinder_scheduler, group: cinder-scheduler }
|
||||||
|
- { name: cinder_volume, group: cinder-volume }
|
||||||
|
- { name: cinder_backup, group: cinder-backup }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cinder_api, group: cinder-api }
|
||||||
|
- { name: cinder_scheduler, group: cinder-scheduler }
|
||||||
|
- { name: cinder_volume, group: cinder-volume }
|
||||||
|
- { name: cinder_backup, group: cinder-backup }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: cinder_api, group: cinder-api },
|
||||||
|
{ name: cinder_scheduler, group: cinder-scheduler },
|
||||||
|
{ name: cinder_volume, group: cinder-volume },
|
||||||
|
{ name: cinder_backup, group: cinder-backup }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: cinder_api, group: cinder-api },
|
||||||
|
{ name: cinder_scheduler, group: cinder-scheduler },
|
||||||
|
{ name: cinder_volume, group: cinder-volume },
|
||||||
|
{ name: cinder_backup, group: cinder-backup }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cloudkitty_api, group: cloudkitty-api }
|
|
||||||
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cloudkitty_api, group: cloudkitty-api }
|
|
||||||
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: cloudkitty_api, group: cloudkitty-api }
|
|
||||||
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: cloudkitty_api, group: cloudkitty-api },
|
|
||||||
{ name: cloudkitty_processor, group: cloudkitty-processor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: cloudkitty_api, group: cloudkitty-api },
|
|
||||||
{ name: cloudkitty_processor, group: cloudkitty-processor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,66 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['cloudkitty-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['cloudkitty-processor']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cloudkitty_api, group: cloudkitty-api }
|
||||||
|
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cloudkitty_api, group: cloudkitty-api }
|
||||||
|
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: cloudkitty_api, group: cloudkitty-api }
|
||||||
|
- { name: cloudkitty_processor, group: cloudkitty-processor }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: cloudkitty_api, group: cloudkitty-api },
|
||||||
|
{ name: cloudkitty_processor, group: cloudkitty-processor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: cloudkitty_api, group: cloudkitty-api },
|
||||||
|
{ name: cloudkitty_processor, group: cloudkitty-processor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: collectd, group: collectd }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: collectd, group: collectd }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: collectd, group: collectd }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: collectd, group: collectd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: collectd, group: collectd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,61 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups ['collectd']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: collectd, group: collectd }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: collectd, group: collectd }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: collectd, group: collectd }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: collectd, group: collectd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: collectd, group: collectd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the heka container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "heka"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Checking the heka config
|
|
||||||
command: docker exec heka /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_result
|
|
||||||
|
|
||||||
- name: Getting the heka container config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "heka"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_env
|
|
||||||
|
|
||||||
- name: Removing the heka container
|
|
||||||
kolla_docker:
|
|
||||||
name: "heka"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_container
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or container_env["KOLLA_CONFIG_STRATEGY"] == "COPY_ONCE"
|
|
||||||
- check_result.rc == 1
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_container.changed
|
|
||||||
|
|
||||||
- name: Restarting the heka container
|
|
||||||
kolla_docker:
|
|
||||||
name: "heka"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ALWAYS"
|
|
||||||
- container_env["KOLLA_CONFIG_STRATEGY"] == "COPY_ALWAYS"
|
|
||||||
- check_result.rc == 1
|
|
@ -1,2 +1,42 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the heka container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "heka"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Checking the heka config
|
||||||
|
command: docker exec heka /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_result
|
||||||
|
|
||||||
|
- name: Getting the heka container config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "heka"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_env
|
||||||
|
|
||||||
|
- name: Removing the heka container
|
||||||
|
kolla_docker:
|
||||||
|
name: "heka"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_container
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or container_env["KOLLA_CONFIG_STRATEGY"] == "COPY_ONCE"
|
||||||
|
- check_result.rc == 1
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_container.changed
|
||||||
|
|
||||||
|
- name: Restarting the heka container
|
||||||
|
kolla_docker:
|
||||||
|
name: "heka"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ALWAYS"
|
||||||
|
- container_env["KOLLA_CONFIG_STRATEGY"] == "COPY_ALWAYS"
|
||||||
|
- check_result.rc == 1
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: elasticsearch, group: elasticsearch }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: elasticsearch, group: elasticsearch }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: elasticsearch, group: elasticsearch }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: elasticsearch, group: elasticsearch }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: elasticsearch, group: elasticsearch }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups ['elasticsearch']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: elasticsearch, group: elasticsearch }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: elasticsearch, group: elasticsearch }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: elasticsearch, group: elasticsearch }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: elasticsearch, group: elasticsearch }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: elasticsearch, group: elasticsearch }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: etcd, group: etcd }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: etcd, group: etcd }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: etcd, group: etcd }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: etcd, group: etcd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: etcd, group: etcd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['etcd']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: etcd, group: etcd }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: etcd, group: etcd }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: etcd, group: etcd }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: etcd, group: etcd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: etcd, group: etcd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ glance_service_groups }}"
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ glance_service_groups }}"
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ glance_service_groups }}"
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- "{{ glance_service_groups }}"
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: bootstrap_service.yml
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- "{{ glance_service_groups }}"
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,63 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['glance-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['glance-registry']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ glance_service_groups }}"
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ glance_service_groups }}"
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ glance_service_groups }}"
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- "{{ glance_service_groups }}"
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: bootstrap_service.yml
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- "{{ glance_service_groups }}"
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: gnocchi_api, group: gnocchi-api }
|
|
||||||
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
|
||||||
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: gnocchi_api, group: gnocchi-api }
|
|
||||||
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
|
||||||
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: gnocchi_api, group: gnocchi-api }
|
|
||||||
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
|
||||||
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: gnocchi_api, group: gnocchi-api },
|
|
||||||
{ name: gnocchi_metricd, group: gnocchi-metricd },
|
|
||||||
{ name: gnocchi_statsd, group: gnocchi-statsd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: gnocchi_api, group: gnocchi-api },
|
|
||||||
{ name: gnocchi_metricd, group: gnocchi-metricd },
|
|
||||||
{ name: gnocchi_statsd, group: gnocchi-statsd }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,74 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['gnocchi-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['gnocchi-metricd']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['gnocchi-statsd']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: gnocchi_api, group: gnocchi-api }
|
||||||
|
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
||||||
|
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: gnocchi_api, group: gnocchi-api }
|
||||||
|
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
||||||
|
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: gnocchi_api, group: gnocchi-api }
|
||||||
|
- { name: gnocchi_metricd, group: gnocchi-metricd }
|
||||||
|
- { name: gnocchi_statsd, group: gnocchi-statsd }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: gnocchi_api, group: gnocchi-api },
|
||||||
|
{ name: gnocchi_metricd, group: gnocchi-metricd },
|
||||||
|
{ name: gnocchi_statsd, group: gnocchi-statsd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: gnocchi_api, group: gnocchi-api },
|
||||||
|
{ name: gnocchi_metricd, group: gnocchi-metricd },
|
||||||
|
{ name: gnocchi_statsd, group: gnocchi-statsd }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "grafana"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups['grafana']
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec grafana /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups['grafana']
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "grafana"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups['grafana']
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "grafana"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE"
|
|
||||||
- inventory_hostname in groups['grafana']
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "grafana"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['grafana']
|
|
@ -1,3 +1,47 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "grafana"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
when: inventory_hostname in groups['grafana']
|
when: inventory_hostname in groups['grafana']
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec grafana /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups['grafana']
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "grafana"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups['grafana']
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "grafana"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE"
|
||||||
|
- inventory_hostname in groups['grafana']
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "grafana"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['grafana']
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: haproxy, group: haproxy }
|
|
||||||
- { name: keepalived, group: haproxy }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: haproxy, group: haproxy }
|
|
||||||
- { name: keepalived, group: haproxy }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: haproxy, group: haproxy }
|
|
||||||
- { name: keepalived, group: haproxy }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: haproxy, group: haproxy },
|
|
||||||
{ name: keepalived, group: haproxy }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
# container_envs.results is a list of two elements, first corresponds to
|
|
||||||
# haproxy container result and second to keepalived container result and the
|
|
||||||
# same applicable for check_results.results
|
|
||||||
- name: Ensuring latest haproxy config is used
|
|
||||||
command: docker exec haproxy /usr/local/bin/kolla_ensure_haproxy_latest_config
|
|
||||||
register: status
|
|
||||||
changed_when: status.stdout.find('changed') != -1
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- container_envs.results[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- check_results.results[0]['rc'] == 1
|
|
||||||
- inventory_hostname in groups['haproxy']
|
|
||||||
|
|
||||||
- name: Restart keepalived container
|
|
||||||
kolla_docker:
|
|
||||||
name: "keepalived"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- container_envs.results[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- check_results.results[1]['rc'] == 1
|
|
||||||
- inventory_hostname in groups['haproxy']
|
|
@ -1,3 +1,74 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['haproxy']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: haproxy, group: haproxy }
|
||||||
|
- { name: keepalived, group: haproxy }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: haproxy, group: haproxy }
|
||||||
|
- { name: keepalived, group: haproxy }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: haproxy, group: haproxy }
|
||||||
|
- { name: keepalived, group: haproxy }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: haproxy, group: haproxy },
|
||||||
|
{ name: keepalived, group: haproxy }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
# container_envs.results is a list of two elements, first corresponds to
|
||||||
|
# haproxy container result and second to keepalived container result and the
|
||||||
|
# same applicable for check_results.results
|
||||||
|
- name: Ensuring latest haproxy config is used
|
||||||
|
command: docker exec haproxy /usr/local/bin/kolla_ensure_haproxy_latest_config
|
||||||
|
register: status
|
||||||
|
changed_when: status.stdout.find('changed') != -1
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- container_envs.results[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- check_results.results[0]['rc'] == 1
|
||||||
|
- inventory_hostname in groups['haproxy']
|
||||||
|
|
||||||
|
- name: Restart keepalived container
|
||||||
|
kolla_docker:
|
||||||
|
name: "keepalived"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- container_envs.results[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- check_results.results[1]['rc'] == 1
|
||||||
|
- inventory_hostname in groups['haproxy']
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: heat_api, group: heat-api }
|
|
||||||
- { name: heat_api_cfn, group: heat-api-cfn }
|
|
||||||
- { name: heat_engine, group: heat-engine }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: heat_api, group: heat-api }
|
|
||||||
- { name: heat_api_cfn, group: heat-api-cfn }
|
|
||||||
- { name: heat_engine, group: heat-engine }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: heat_api, group: heat-api }
|
|
||||||
- { name: heat_api_cfn, group: heat-api-cfn }
|
|
||||||
- { name: heat_engine, group: heat-engine }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: heat_api, group: heat-api },
|
|
||||||
{ name: heat_api_cfn, group: heat-api-cfn },
|
|
||||||
{ name: heat_engine, group: heat-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: heat_api, group: heat-api },
|
|
||||||
{ name: heat_api_cfn, group: heat-api-cfn },
|
|
||||||
{ name: heat_engine, group: heat-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,74 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['heat-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['heat-api-cfn']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['heat-engine']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: heat_api, group: heat-api }
|
||||||
|
- { name: heat_api_cfn, group: heat-api-cfn }
|
||||||
|
- { name: heat_engine, group: heat-engine }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: heat_api, group: heat-api }
|
||||||
|
- { name: heat_api_cfn, group: heat-api-cfn }
|
||||||
|
- { name: heat_engine, group: heat-engine }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: heat_api, group: heat-api }
|
||||||
|
- { name: heat_api_cfn, group: heat-api-cfn }
|
||||||
|
- { name: heat_engine, group: heat-engine }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: heat_api, group: heat-api },
|
||||||
|
{ name: heat_api_cfn, group: heat-api-cfn },
|
||||||
|
{ name: heat_engine, group: heat-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: heat_api, group: heat-api },
|
||||||
|
{ name: heat_api_cfn, group: heat-api-cfn },
|
||||||
|
{ name: heat_engine, group: heat-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: horizon, group: horizon }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: horizon, group: horizon }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: horizon, group: horizon }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: horizon, group: horizon }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: horizon, group: horizon }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['horizon']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: horizon, group: horizon }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: horizon, group: horizon }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: horizon, group: horizon }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: horizon, group: horizon }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: horizon, group: horizon }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "influxdb"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups['influxdb']
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec influxdb /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups['influxdb']
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "influxdb"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups['influxdb']
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "influxdb"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE"
|
|
||||||
- inventory_hostname in groups['influxdb']
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "influxdb"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['influxdb']
|
|
@ -1,3 +1,47 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "influxdb"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
when: inventory_hostname in groups['influxdb']
|
when: inventory_hostname in groups['influxdb']
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec influxdb /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups['influxdb']
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "influxdb"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups['influxdb']
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "influxdb"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE"
|
||||||
|
- inventory_hostname in groups['influxdb']
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "influxdb"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['influxdb']
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ironic_pxe, group: ironic-pxe }
|
|
||||||
- { name: ironic_api, group: ironic-api }
|
|
||||||
- { name: ironic_conductor, group: ironic-conductor }
|
|
||||||
- { name: ironic_inspector, group: ironic-inspector }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ironic_pxe, group: ironic-pxe }
|
|
||||||
- { name: ironic_api, group: ironic-api }
|
|
||||||
- { name: ironic_conductor, group: ironic-conductor }
|
|
||||||
- { name: ironic_inspector, group: ironic-inspector }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: ironic_pxe, group: ironic-pxe }
|
|
||||||
- { name: ironic_api, group: ironic-api }
|
|
||||||
- { name: ironic_conductor, group: ironic-conductor }
|
|
||||||
- { name: ironic_inspector, group: ironic-inspector }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ironic_pxe, group: ironic-pxe },
|
|
||||||
{ name: ironic_api, group: ironic-api },
|
|
||||||
{ name: ironic_conductor, group: ironic-conductor },
|
|
||||||
{ name: ironic_inspector, group: ironic-inspector }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: ironic_pxe, group: ironic-pxe },
|
|
||||||
{ name: ironic_api, group: ironic-api },
|
|
||||||
{ name: ironic_conductor, group: ironic-conductor },
|
|
||||||
{ name: ironic_inspector, group: ironic-inspector }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,6 +1,76 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['ironic-pxe']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['ironic-api']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['ironic-conductor']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['ironic-inspector']
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ironic_pxe, group: ironic-pxe }
|
||||||
|
- { name: ironic_api, group: ironic-api }
|
||||||
|
- { name: ironic_conductor, group: ironic-conductor }
|
||||||
|
- { name: ironic_inspector, group: ironic-inspector }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ironic_pxe, group: ironic-pxe }
|
||||||
|
- { name: ironic_api, group: ironic-api }
|
||||||
|
- { name: ironic_conductor, group: ironic-conductor }
|
||||||
|
- { name: ironic_inspector, group: ironic-inspector }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: ironic_pxe, group: ironic-pxe }
|
||||||
|
- { name: ironic_api, group: ironic-api }
|
||||||
|
- { name: ironic_conductor, group: ironic-conductor }
|
||||||
|
- { name: ironic_inspector, group: ironic-inspector }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ironic_pxe, group: ironic-pxe },
|
||||||
|
{ name: ironic_api, group: ironic-api },
|
||||||
|
{ name: ironic_conductor, group: ironic-conductor },
|
||||||
|
{ name: ironic_inspector, group: ironic-inspector }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: ironic_pxe, group: ironic-pxe },
|
||||||
|
{ name: ironic_api, group: ironic-api },
|
||||||
|
{ name: ironic_conductor, group: ironic-conductor },
|
||||||
|
{ name: ironic_inspector, group: ironic-inspector }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Set variable for keystone components used in reconfigure
|
|
||||||
set_fact:
|
|
||||||
keystone_items:
|
|
||||||
- { name: keystone, group: keystone }
|
|
||||||
|
|
||||||
- name: Add fernet related components to variable if fernet is enabled
|
|
||||||
set_fact:
|
|
||||||
keystone_fernet_items:
|
|
||||||
- { name: keystone_fernet, group: keystone }
|
|
||||||
- { name: keystone_ssh, group: keystone }
|
|
||||||
keystone_items: "{{ keystone_items + keystone_fernet_items }}"
|
|
||||||
when: keystone_token_provider == 'fernet'
|
|
||||||
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ keystone_items }}"
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ keystone_items }}"
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items: "{{ keystone_items }}"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- "{{ keystone_items }}"
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- "{{ keystone_items }}"
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,75 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Set variable for keystone components used in reconfigure
|
||||||
when: inventory_hostname in groups['keystone']
|
set_fact:
|
||||||
|
keystone_items:
|
||||||
|
- { name: keystone, group: keystone }
|
||||||
|
|
||||||
|
- name: Add fernet related components to variable if fernet is enabled
|
||||||
|
set_fact:
|
||||||
|
keystone_fernet_items:
|
||||||
|
- { name: keystone_fernet, group: keystone }
|
||||||
|
- { name: keystone_ssh, group: keystone }
|
||||||
|
keystone_items: "{{ keystone_items + keystone_fernet_items }}"
|
||||||
|
when: keystone_token_provider == 'fernet'
|
||||||
|
|
||||||
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ keystone_items }}"
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ keystone_items }}"
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items: "{{ keystone_items }}"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- "{{ keystone_items }}"
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- "{{ keystone_items }}"
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: magnum_api, group: magnum-api }
|
|
||||||
- { name: magnum_conductor, group: magnum-conductor }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: magnum_api, group: magnum-api }
|
|
||||||
- { name: magnum_conductor, group: magnum-conductor }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: magnum_api, group: magnum-api }
|
|
||||||
- { name: magnum_conductor, group: magnum-conductor }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: magnum_api, group: magnum-api },
|
|
||||||
{ name: magnum_conductor, group: magnum-conductor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: magnum_api, group: magnum-api },
|
|
||||||
{ name: magnum_conductor, group: magnum-conductor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,69 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['magnum-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['magnum-conductor']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: magnum_api, group: magnum-api }
|
||||||
|
- { name: magnum_conductor, group: magnum-conductor }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: magnum_api, group: magnum-api }
|
||||||
|
- { name: magnum_conductor, group: magnum-conductor }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: magnum_api, group: magnum-api }
|
||||||
|
- { name: magnum_conductor, group: magnum-conductor }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: magnum_api, group: magnum-api },
|
||||||
|
{ name: magnum_conductor, group: magnum-conductor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: magnum_api, group: magnum-api },
|
||||||
|
{ name: magnum_conductor, group: magnum-conductor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: manila_api, group: manila-api }
|
|
||||||
- { name: manila_scheduler, group: manila-scheduler }
|
|
||||||
- { name: manila_share, group: manila-share }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: manila_api, group: manila-api }
|
|
||||||
- { name: manila_scheduler, group: manila-scheduler }
|
|
||||||
- { name: manila_share, group: manila-share }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: manila_api, group: manila-api }
|
|
||||||
- { name: manila_scheduler, group: manila-scheduler }
|
|
||||||
- { name: manila_share, group: manila-share }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: manila_api, group: manila-api },
|
|
||||||
{ name: manila_scheduler, group: manila-scheduler },
|
|
||||||
{ name: manila_share, group: manila-share }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: manila_api, group: manila-api },
|
|
||||||
{ name: manila_scheduler, group: manila-scheduler },
|
|
||||||
{ name: manila_share, group: manila-share }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,74 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['manila-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['manila-scheduler']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['manila-share']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: manila_api, group: manila-api }
|
||||||
|
- { name: manila_scheduler, group: manila-scheduler }
|
||||||
|
- { name: manila_share, group: manila-share }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: manila_api, group: manila-api }
|
||||||
|
- { name: manila_scheduler, group: manila-scheduler }
|
||||||
|
- { name: manila_share, group: manila-share }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: manila_api, group: manila-api }
|
||||||
|
- { name: manila_scheduler, group: manila-scheduler }
|
||||||
|
- { name: manila_share, group: manila-share }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: manila_api, group: manila-api },
|
||||||
|
{ name: manila_scheduler, group: manila-scheduler },
|
||||||
|
{ name: manila_share, group: manila-share }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: manila_api, group: manila-api },
|
||||||
|
{ name: manila_scheduler, group: manila-scheduler },
|
||||||
|
{ name: manila_share, group: manila-share }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mariadb, group: mariadb }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mariadb, group: mariadb }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mariadb, group: mariadb }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: mariadb, group: mariadb }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: mariadb, group: mariadb }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: check.yml
|
|
@ -1,3 +1,66 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['mariadb']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mariadb, group: mariadb }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mariadb, group: mariadb }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mariadb, group: mariadb }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: mariadb, group: mariadb }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: mariadb, group: mariadb }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: check.yml
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: memcached, group: memcached }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: memcached, group: memcached }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: memcached, group: memcached }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: memcached, group: memcached }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: memcached, group: memcached }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups ['memcached']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: memcached, group: memcached }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: memcached, group: memcached }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: memcached, group: memcached }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: memcached, group: memcached }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: memcached, group: memcached }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mistral_api, group: mistral-api }
|
|
||||||
- { name: mistral_engine, group: mistral-engine }
|
|
||||||
- { name: mistral_executor, group: mistral-executor }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mistral_api, group: mistral-api }
|
|
||||||
- { name: mistral_engine, group: mistral-engine }
|
|
||||||
- { name: mistral_executor, group: mistral-executor }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mistral_api, group: mistral-api }
|
|
||||||
- { name: mistral_engine, group: mistral-engine }
|
|
||||||
- { name: mistral_executor, group: mistral-executor }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: mistral_api, group: mistral-api },
|
|
||||||
{ name: mistral_engine, group: mistral-engine },
|
|
||||||
{ name: mistral_executor, group: mistral-executor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: mistral_api, group: mistral-api },
|
|
||||||
{ name: mistral_engine, group: mistral-engine },
|
|
||||||
{ name: mistral_executor, group: mistral-executor }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,71 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['mistral-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['mistral-engine']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['mistral-executor']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mistral_api, group: mistral-api }
|
||||||
|
- { name: mistral_engine, group: mistral-engine }
|
||||||
|
- { name: mistral_executor, group: mistral-executor }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mistral_api, group: mistral-api }
|
||||||
|
- { name: mistral_engine, group: mistral-engine }
|
||||||
|
- { name: mistral_executor, group: mistral-executor }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mistral_api, group: mistral-api }
|
||||||
|
- { name: mistral_engine, group: mistral-engine }
|
||||||
|
- { name: mistral_executor, group: mistral-executor }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: mistral_api, group: mistral-api },
|
||||||
|
{ name: mistral_engine, group: mistral-engine },
|
||||||
|
{ name: mistral_executor, group: mistral-executor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: mistral_api, group: mistral-api },
|
||||||
|
{ name: mistral_engine, group: mistral-engine },
|
||||||
|
{ name: mistral_executor, group: mistral-executor }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mongodb, group: mongodb }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mongodb, group: mongodb }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: mongodb, group: mongodb }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: mongodb, group: mongodb }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: mongodb, group: mongodb }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['mongodb']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mongodb, group: mongodb }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mongodb, group: mongodb }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: mongodb, group: mongodb }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: mongodb, group: mongodb }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: mongodb, group: mongodb }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: murano_api, group: murano-api }
|
|
||||||
- { name: murano_engine, group: murano-engine }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: murano_api, group: murano-api }
|
|
||||||
- { name: murano_engine, group: murano-engine }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: murano_api, group: murano-api }
|
|
||||||
- { name: murano_engine, group: murano-engine }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: murano_api, group: murano-api },
|
|
||||||
{ name: murano_engine, group: murano-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: murano_api, group: murano-api },
|
|
||||||
{ name: murano_engine, group: murano-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,66 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['murano-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['murano-engine']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: murano_api, group: murano-api }
|
||||||
|
- { name: murano_engine, group: murano-engine }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: murano_api, group: murano-api }
|
||||||
|
- { name: murano_engine, group: murano-engine }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: murano_api, group: murano-api }
|
||||||
|
- { name: murano_engine, group: murano-engine }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: murano_api, group: murano-api },
|
||||||
|
{ name: murano_engine, group: murano-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: murano_api, group: murano-api },
|
||||||
|
{ name: murano_engine, group: murano-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,324 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers running neutron-server and neutron agents are up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: neutron_container_states
|
|
||||||
failed_when: neutron_container_states.Running == false
|
|
||||||
when:
|
|
||||||
- "{{ item.enabled|default(True) }}"
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: neutron_server, group: neutron-server }
|
|
||||||
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
|
||||||
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
|
||||||
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
|
||||||
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
|
||||||
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
|
||||||
|
|
||||||
- name: Ensuring the neutron_openvswitch_agent container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: neutron_openvswitch_agent
|
|
||||||
action: "get_container_state"
|
|
||||||
register: openvswitch_agent_container_states
|
|
||||||
failed_when: openvswitch_agent_container_states.Running == false
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "openvswitch"
|
|
||||||
- (
|
|
||||||
( inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and not enable_nova_fake | bool
|
|
||||||
) or
|
|
||||||
( inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and enable_nova_fake | bool
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
- name: Ensuring the neutron_linuxbridge_agent container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: neutron_linuxbridge_agent
|
|
||||||
action: "get_container_state"
|
|
||||||
register: linuxbridge_agent_container_states
|
|
||||||
failed_when: linuxbridge_agent_container_states.Running == false
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "linuxbridge"
|
|
||||||
- (inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs in containers running neutron-server and neutron agents
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: neutron_check_results
|
|
||||||
when:
|
|
||||||
- "{{ item.enabled|default(True) }}"
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: neutron_server, group: neutron-server }
|
|
||||||
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
|
||||||
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
|
||||||
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
|
||||||
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
|
||||||
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
|
||||||
|
|
||||||
- name: Check the configs in the neutron_openvswitch_agent container
|
|
||||||
command: docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: openvswitch_agent_check_results
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "openvswitch"
|
|
||||||
- (
|
|
||||||
( inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and not enable_nova_fake | bool
|
|
||||||
) or
|
|
||||||
( inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and enable_nova_fake | bool
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
- name: Check the configs in the neutron_linuxbridge_agent container
|
|
||||||
command: docker exec neutron_linuxbridge_agent /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: linuxbridge_agent_check_results
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "linuxbridge"
|
|
||||||
- (inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy for containers running neutron-server and neutron agents
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: neutron_container_envs
|
|
||||||
when:
|
|
||||||
- "{{ item.enabled|default(True) }}"
|
|
||||||
- inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: neutron_server, group: neutron-server }
|
|
||||||
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
|
||||||
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
|
||||||
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
|
||||||
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
|
||||||
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
|
||||||
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
|
||||||
|
|
||||||
- name: Container config strategy for the neutron_openvswitch_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_openvswitch_agent"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: openvswitch_agent_envs
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "openvswitch"
|
|
||||||
- (
|
|
||||||
( not enable_nova_fake | bool
|
|
||||||
and inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
) or
|
|
||||||
( enable_nova_fake | bool
|
|
||||||
and inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
- name: Container config strategy for the neutron_linuxbridge_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_linuxbridge_agent"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: linuxbridge_agent_envs
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "linuxbridge"
|
|
||||||
- (inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
|
||||||
|
|
||||||
- name: Remove the containers running neutron-server and neutron agents
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: neutron_remove_containers
|
|
||||||
when:
|
|
||||||
- "{{ item[0].enabled | default(True) }}"
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: neutron_server, group: neutron-server },
|
|
||||||
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent },
|
|
||||||
{ name: neutron_l3_agent, group: neutron-l3-agent },
|
|
||||||
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
|
||||||
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
|
|
||||||
{ name: neutron_metadata_agent, group: neutron-metadata-agent },
|
|
||||||
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
|
||||||
{ name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }]
|
|
||||||
- "{{ neutron_container_envs.results }}"
|
|
||||||
- "{{ neutron_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Remove the neutron_openvswitch_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_openvswitch_agent"
|
|
||||||
action: "remove_container"
|
|
||||||
register: openvswitch_agent_remove_containers
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "openvswitch"
|
|
||||||
- (
|
|
||||||
( not enable_nova_fake | bool
|
|
||||||
and inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
) or
|
|
||||||
( enable_nova_fake | bool
|
|
||||||
and inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
- config_strategy == "COPY_ONCE" or openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- openvswitch_agent_check_results['rc'] == 1
|
|
||||||
|
|
||||||
- name: Remove the neutron_linuxbridge_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_linuxbridge_agent"
|
|
||||||
action: "remove_container"
|
|
||||||
register: linuxbridge_agent_remove_containers
|
|
||||||
when:
|
|
||||||
- neutron_plugin_agent == "linuxbridge"
|
|
||||||
- (inventory_hostname in groups['compute']
|
|
||||||
or inventory_hostname in groups['manila-share']
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
|
||||||
- config_strategy == "COPY_ONCE" or linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- linuxbridge_agent_check_results['rc'] == 1
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: neutron_remove_containers.changed
|
|
||||||
or openvswitch_agent_remove_containers.changed
|
|
||||||
or linuxbridge_agent_remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers running neutron-server and neutron agents
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- "{{ item[0].enabled|default(True) }}"
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: neutron_server, group: neutron-server },
|
|
||||||
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent },
|
|
||||||
{ name: neutron_l3_agent, group: neutron-l3-agent },
|
|
||||||
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
|
||||||
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
|
|
||||||
{ name: neutron_metadata_agent, group: neutron-metadata-agent },
|
|
||||||
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
|
||||||
{ name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }]
|
|
||||||
- "{{ neutron_container_envs.results }}"
|
|
||||||
- "{{ neutron_check_results.results }}"
|
|
||||||
|
|
||||||
- name: Restart the neutron_openvswitch_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_openvswitch_agent"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- neutron_plugin_agent == "openvswitch"
|
|
||||||
- (
|
|
||||||
( inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and not enable_nova_fake | bool
|
|
||||||
) or
|
|
||||||
( inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
|
||||||
and enable_nova_fake | bool
|
|
||||||
)
|
|
||||||
)
|
|
||||||
- openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- openvswitch_agent_check_results['rc'] == 1
|
|
||||||
|
|
||||||
- name: Restart the neutron_linuxbridge_agent container
|
|
||||||
kolla_docker:
|
|
||||||
name: "neutron_linuxbridge_agent"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- neutron_plugin_agent == "linuxbridge"
|
|
||||||
- (inventory_hostname in groups['compute']
|
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
|
||||||
- linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- linuxbridge_agent_check_results['rc'] == 1
|
|
@ -1,10 +1,324 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers running neutron-server and neutron agents are up
|
||||||
when: inventory_hostname in groups['neutron-server']
|
kolla_docker:
|
||||||
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['compute']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['neutron-dhcp-agent']
|
register: neutron_container_states
|
||||||
or inventory_hostname in groups['neutron-l3-agent']
|
failed_when: neutron_container_states.Running == false
|
||||||
or inventory_hostname in groups['neutron-lbaas-agent']
|
when:
|
||||||
or inventory_hostname in groups['neutron-metadata-agent']
|
- "{{ item.enabled|default(True) }}"
|
||||||
or inventory_hostname in groups['neutron-vpnaas-agent']
|
- inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: neutron_server, group: neutron-server }
|
||||||
|
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
||||||
|
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
||||||
|
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
||||||
|
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
||||||
|
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
||||||
|
|
||||||
|
- name: Ensuring the neutron_openvswitch_agent container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: neutron_openvswitch_agent
|
||||||
|
action: "get_container_state"
|
||||||
|
register: openvswitch_agent_container_states
|
||||||
|
failed_when: openvswitch_agent_container_states.Running == false
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "openvswitch"
|
||||||
|
- (
|
||||||
|
( inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and not enable_nova_fake | bool
|
||||||
|
) or
|
||||||
|
( inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and enable_nova_fake | bool
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Ensuring the neutron_linuxbridge_agent container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: neutron_linuxbridge_agent
|
||||||
|
action: "get_container_state"
|
||||||
|
register: linuxbridge_agent_container_states
|
||||||
|
failed_when: linuxbridge_agent_container_states.Running == false
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "linuxbridge"
|
||||||
|
- (inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs in containers running neutron-server and neutron agents
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: neutron_check_results
|
||||||
|
when:
|
||||||
|
- "{{ item.enabled|default(True) }}"
|
||||||
|
- inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: neutron_server, group: neutron-server }
|
||||||
|
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
||||||
|
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
||||||
|
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
||||||
|
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
||||||
|
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
||||||
|
|
||||||
|
- name: Check the configs in the neutron_openvswitch_agent container
|
||||||
|
command: docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: openvswitch_agent_check_results
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "openvswitch"
|
||||||
|
- (
|
||||||
|
( inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and not enable_nova_fake | bool
|
||||||
|
) or
|
||||||
|
( inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and enable_nova_fake | bool
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Check the configs in the neutron_linuxbridge_agent container
|
||||||
|
command: docker exec neutron_linuxbridge_agent /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: linuxbridge_agent_check_results
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "linuxbridge"
|
||||||
|
- (inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy for containers running neutron-server and neutron agents
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: neutron_container_envs
|
||||||
|
when:
|
||||||
|
- "{{ item.enabled|default(True) }}"
|
||||||
|
- inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: neutron_server, group: neutron-server }
|
||||||
|
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
|
||||||
|
- { name: neutron_l3_agent, group: neutron-l3-agent }
|
||||||
|
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
|
||||||
|
- { name: neutron_metadata_agent, group: neutron-metadata-agent }
|
||||||
|
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
|
||||||
|
- { name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }
|
||||||
|
|
||||||
|
- name: Container config strategy for the neutron_openvswitch_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_openvswitch_agent"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: openvswitch_agent_envs
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "openvswitch"
|
||||||
|
- (
|
||||||
|
( not enable_nova_fake | bool
|
||||||
|
and inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
) or
|
||||||
|
( enable_nova_fake | bool
|
||||||
|
and inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Container config strategy for the neutron_linuxbridge_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_linuxbridge_agent"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: linuxbridge_agent_envs
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "linuxbridge"
|
||||||
|
- (inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
||||||
|
|
||||||
|
- name: Remove the containers running neutron-server and neutron agents
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: neutron_remove_containers
|
||||||
|
when:
|
||||||
|
- "{{ item[0].enabled | default(True) }}"
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: neutron_server, group: neutron-server },
|
||||||
|
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent },
|
||||||
|
{ name: neutron_l3_agent, group: neutron-l3-agent },
|
||||||
|
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
||||||
|
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
|
||||||
|
{ name: neutron_metadata_agent, group: neutron-metadata-agent },
|
||||||
|
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
||||||
|
{ name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }]
|
||||||
|
- "{{ neutron_container_envs.results }}"
|
||||||
|
- "{{ neutron_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Remove the neutron_openvswitch_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_openvswitch_agent"
|
||||||
|
action: "remove_container"
|
||||||
|
register: openvswitch_agent_remove_containers
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "openvswitch"
|
||||||
|
- (
|
||||||
|
( not enable_nova_fake | bool
|
||||||
|
and inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
) or
|
||||||
|
( enable_nova_fake | bool
|
||||||
|
and inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
- config_strategy == "COPY_ONCE" or openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- openvswitch_agent_check_results['rc'] == 1
|
||||||
|
|
||||||
|
- name: Remove the neutron_linuxbridge_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_linuxbridge_agent"
|
||||||
|
action: "remove_container"
|
||||||
|
register: linuxbridge_agent_remove_containers
|
||||||
|
when:
|
||||||
|
- neutron_plugin_agent == "linuxbridge"
|
||||||
|
- (inventory_hostname in groups['compute']
|
||||||
|
or inventory_hostname in groups['manila-share']
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
||||||
|
- config_strategy == "COPY_ONCE" or linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- linuxbridge_agent_check_results['rc'] == 1
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: neutron_remove_containers.changed
|
||||||
|
or openvswitch_agent_remove_containers.changed
|
||||||
|
or linuxbridge_agent_remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers running neutron-server and neutron agents
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- "{{ item[0].enabled|default(True) }}"
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: neutron_server, group: neutron-server },
|
||||||
|
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent },
|
||||||
|
{ name: neutron_l3_agent, group: neutron-l3-agent },
|
||||||
|
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
||||||
|
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
|
||||||
|
{ name: neutron_metadata_agent, group: neutron-metadata-agent },
|
||||||
|
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
|
||||||
|
{ name: neutron_vpnaas_agent, group: neutron-vpnaas-agent, enabled: "{{ enable_neutron_vpnaas | bool }}" }]
|
||||||
|
- "{{ neutron_container_envs.results }}"
|
||||||
|
- "{{ neutron_check_results.results }}"
|
||||||
|
|
||||||
|
- name: Restart the neutron_openvswitch_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_openvswitch_agent"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- neutron_plugin_agent == "openvswitch"
|
||||||
|
- (
|
||||||
|
( inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and not enable_nova_fake | bool
|
||||||
|
) or
|
||||||
|
( inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent']
|
||||||
|
and enable_nova_fake | bool
|
||||||
|
)
|
||||||
|
)
|
||||||
|
- openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- openvswitch_agent_check_results['rc'] == 1
|
||||||
|
|
||||||
|
- name: Restart the neutron_linuxbridge_agent container
|
||||||
|
kolla_docker:
|
||||||
|
name: "neutron_linuxbridge_agent"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- neutron_plugin_agent == "linuxbridge"
|
||||||
|
- (inventory_hostname in groups['compute']
|
||||||
|
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
|
||||||
|
or inventory_hostname in groups['neutron-dhcp-agent']
|
||||||
|
or inventory_hostname in groups['neutron-l3-agent']
|
||||||
|
or inventory_hostname in groups['neutron-lbaas-agent']
|
||||||
|
or inventory_hostname in groups['neutron-metadata-agent']
|
||||||
|
or inventory_hostname in groups['neutron-vpnaas-agent'])
|
||||||
|
- linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- linuxbridge_agent_check_results['rc'] == 1
|
||||||
|
@ -1,318 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers are up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: nova_libvirt, group: compute }
|
|
||||||
- { name: nova_ssh, group: compute }
|
|
||||||
- { name: nova_conductor, group: nova-conductor }
|
|
||||||
- { name: nova_api, group: nova-api }
|
|
||||||
- { name: nova_consoleauth, group: nova-consoleauth }
|
|
||||||
- { name: nova_scheduler, group: nova-scheduler }
|
|
||||||
|
|
||||||
- name: Ensuring the nova_compute container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_compute"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
|
|
||||||
- name: Ensuring the nova_compute_ironic container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_compute_ironic"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- inventory_hostname in groups['nova-compute-ironic']
|
|
||||||
|
|
||||||
- name: Ensuring the nova_novncproxy container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_novncproxy"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- inventory_hostname in groups['nova-novncproxy']
|
|
||||||
|
|
||||||
- name: Ensuring the nova_spicehtml5proxy container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_spicehtml5proxy"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- inventory_hostname in groups['nova-spicehtml5proxy']
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: nova_libvirt, group: compute }
|
|
||||||
- { name: nova_ssh, group: compute }
|
|
||||||
- { name: nova_conductor, group: nova-conductor }
|
|
||||||
- { name: nova_api, group: nova-api }
|
|
||||||
- { name: nova_consoleauth, group: nova-consoleauth }
|
|
||||||
- { name: nova_scheduler, group: nova-scheduler }
|
|
||||||
|
|
||||||
- name: Check the configs in the nova_compute container
|
|
||||||
command: docker exec nova_compute /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: nova_compute_check_result
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
|
|
||||||
- name: Check the configs in the nova_compute_ironic container
|
|
||||||
command: docker exec nova_compute_ironic /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: nova_compute_ironic_check_result
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- inventory_hostname in groups['nova-compute-ironic']
|
|
||||||
|
|
||||||
- name: Check the configs in the nova_novncproxy container
|
|
||||||
command: docker exec nova_novncproxy /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: nova_novncproxy_check_result
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- inventory_hostname in groups['nova-novncproxy']
|
|
||||||
|
|
||||||
- name: Check the configs in the nova_spicehtml5proxy container
|
|
||||||
command: docker exec nova_spicehtml5proxy /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: nova_spicehtml5proxy_check_result
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- inventory_hostname in groups['nova-spicehtml5proxy']
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: nova_libvirt, group: compute }
|
|
||||||
- { name: nova_ssh, group: compute }
|
|
||||||
- { name: nova_conductor, group: nova-conductor }
|
|
||||||
- { name: nova_api, group: nova-api }
|
|
||||||
- { name: nova_consoleauth, group: nova-consoleauth }
|
|
||||||
- { name: nova_scheduler, group: nova-scheduler }
|
|
||||||
|
|
||||||
- name: Container config strategy for nova_compute
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_compute
|
|
||||||
action: "get_container_env"
|
|
||||||
register: nova_compute_container_env
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
|
|
||||||
- name: Container config strategy for nova_compute_ironic
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_compute_ironic
|
|
||||||
action: "get_container_env"
|
|
||||||
register: nova_compute_ironic_container_env
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- inventory_hostname in groups['nova-compute-ironic']
|
|
||||||
|
|
||||||
- name: Container config strategy for nova_novncproxy
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_novncproxy
|
|
||||||
action: "get_container_env"
|
|
||||||
register: nova_novncproxy_container_env
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- inventory_hostname in groups['nova-novncproxy']
|
|
||||||
|
|
||||||
- name: Container config strategy for nova_spicehtml5proxy
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_spicehtml5proxy
|
|
||||||
action: "get_container_env"
|
|
||||||
register: nova_spicehtml5proxy_container_env
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- inventory_hostname in groups['nova-spicehtml5proxy']
|
|
||||||
|
|
||||||
- name: Remove the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
until: remote_container|success
|
|
||||||
retries: "{{ item[0]['retries']|default(0) }}"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
# NOTE(Jeffrey4l): retry 1 to remove nova_libvirt container because when
|
|
||||||
# guests running, nova_libvirt will raise error even though it is removed.
|
|
||||||
- [{ name: nova_libvirt, group: compute, retries: 1 },
|
|
||||||
{ name: nova_ssh, group: compute },
|
|
||||||
{ name: nova_conductor, group: nova-conductor },
|
|
||||||
{ name: nova_api, group: nova-api },
|
|
||||||
{ name: nova_consoleauth, group: nova-consoleauth },
|
|
||||||
{ name: nova_scheduler, group: nova-scheduler }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- name: Remove nova_compute container
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_compute
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_nova_compute_container
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
- config_strategy == 'COPY_ONCE' or nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- nova_compute_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Remove nova_compute_ironic container
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_compute_ironic
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_nova_compute_ironic_container
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- inventory_hostname in groups['nova-compute-ironic']
|
|
||||||
- config_strategy == 'COPY_ONCE' or nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- nova_compute_ironic_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Remove nova_novncproxy container
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_novncproxy
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_nova_novncproxy_container
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- inventory_hostname in groups['nova-novncproxy']
|
|
||||||
- config_strategy == 'COPY_ONCE' or nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- nova_novncproxy_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Remove nova_spicehtml5proxy container
|
|
||||||
kolla_docker:
|
|
||||||
name: nova_spicehtml5proxy
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_nova_spicehtml5proxy_container
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- inventory_hostname in groups['nova-spicehtml5proxy']
|
|
||||||
- config_strategy == 'COPY_ONCE' or nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- nova_spicehtml5proxy_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- remove_nova_compute_container.changed
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- remove_nova_compute_ironic_container.changed
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- remove_nova_compute_ironic_container.changed
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- remove_nova_novncproxy_container.changed
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- remove_nova_spicehtml5proxy_container.changed
|
|
||||||
|
|
||||||
- name: Restart the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: nova_libvirt, group: compute },
|
|
||||||
{ name: nova_ssh, group: compute },
|
|
||||||
{ name: nova_conductor, group: nova-conductor },
|
|
||||||
{ name: nova_api, group: nova-api },
|
|
||||||
{ name: nova_consoleauth, group: nova-consoleauth },
|
|
||||||
{ name: nova_scheduler, group: nova-scheduler }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- name: Restart the nova_compute container
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_compute"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- not enable_nova_fake | bool
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
- nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- nova_compute_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Restart the nova_compute_ironic container
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_compute_ironic"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- enable_ironic | bool
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['nova-compute-ironic']
|
|
||||||
- nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- nova_compute_ironic_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Restart the nova_novncproxy container
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_novncproxy"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- nova_console == 'novnc'
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['nova-novncproxy']
|
|
||||||
- nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- nova_novncproxy_check_result['rc'] == 1
|
|
||||||
|
|
||||||
- name: Restart the nova_spicehtml5proxy container
|
|
||||||
kolla_docker:
|
|
||||||
name: "nova_spicehtml5proxy"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- nova_console == 'spice'
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- inventory_hostname in groups['nova-spicehtml5proxy']
|
|
||||||
- nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- nova_spicehtml5proxy_check_result['rc'] == 1
|
|
@ -1,10 +1,318 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers are up
|
||||||
when: inventory_hostname in groups['compute']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['nova-conductor']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['nova-api']
|
action: "get_container_state"
|
||||||
or inventory_hostname in groups['nova-consoleauth']
|
register: container_state
|
||||||
or inventory_hostname in groups['nova-scheduler']
|
failed_when: container_state.Running == false
|
||||||
or inventory_hostname in groups['nova-compute-ironic']
|
when: inventory_hostname in groups[item.group]
|
||||||
or inventory_hostname in groups['nova-novncproxy']
|
with_items:
|
||||||
or inventory_hostname in groups['nova-spicehtml5proxy']
|
- { name: nova_libvirt, group: compute }
|
||||||
|
- { name: nova_ssh, group: compute }
|
||||||
|
- { name: nova_conductor, group: nova-conductor }
|
||||||
|
- { name: nova_api, group: nova-api }
|
||||||
|
- { name: nova_consoleauth, group: nova-consoleauth }
|
||||||
|
- { name: nova_scheduler, group: nova-scheduler }
|
||||||
|
|
||||||
|
- name: Ensuring the nova_compute container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_compute"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
|
||||||
|
- name: Ensuring the nova_compute_ironic container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_compute_ironic"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- inventory_hostname in groups['nova-compute-ironic']
|
||||||
|
|
||||||
|
- name: Ensuring the nova_novncproxy container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_novncproxy"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- inventory_hostname in groups['nova-novncproxy']
|
||||||
|
|
||||||
|
- name: Ensuring the nova_spicehtml5proxy container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_spicehtml5proxy"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- inventory_hostname in groups['nova-spicehtml5proxy']
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: nova_libvirt, group: compute }
|
||||||
|
- { name: nova_ssh, group: compute }
|
||||||
|
- { name: nova_conductor, group: nova-conductor }
|
||||||
|
- { name: nova_api, group: nova-api }
|
||||||
|
- { name: nova_consoleauth, group: nova-consoleauth }
|
||||||
|
- { name: nova_scheduler, group: nova-scheduler }
|
||||||
|
|
||||||
|
- name: Check the configs in the nova_compute container
|
||||||
|
command: docker exec nova_compute /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: nova_compute_check_result
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
|
||||||
|
- name: Check the configs in the nova_compute_ironic container
|
||||||
|
command: docker exec nova_compute_ironic /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: nova_compute_ironic_check_result
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- inventory_hostname in groups['nova-compute-ironic']
|
||||||
|
|
||||||
|
- name: Check the configs in the nova_novncproxy container
|
||||||
|
command: docker exec nova_novncproxy /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: nova_novncproxy_check_result
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- inventory_hostname in groups['nova-novncproxy']
|
||||||
|
|
||||||
|
- name: Check the configs in the nova_spicehtml5proxy container
|
||||||
|
command: docker exec nova_spicehtml5proxy /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: nova_spicehtml5proxy_check_result
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- inventory_hostname in groups['nova-spicehtml5proxy']
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: nova_libvirt, group: compute }
|
||||||
|
- { name: nova_ssh, group: compute }
|
||||||
|
- { name: nova_conductor, group: nova-conductor }
|
||||||
|
- { name: nova_api, group: nova-api }
|
||||||
|
- { name: nova_consoleauth, group: nova-consoleauth }
|
||||||
|
- { name: nova_scheduler, group: nova-scheduler }
|
||||||
|
|
||||||
|
- name: Container config strategy for nova_compute
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_compute
|
||||||
|
action: "get_container_env"
|
||||||
|
register: nova_compute_container_env
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
|
||||||
|
- name: Container config strategy for nova_compute_ironic
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_compute_ironic
|
||||||
|
action: "get_container_env"
|
||||||
|
register: nova_compute_ironic_container_env
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- inventory_hostname in groups['nova-compute-ironic']
|
||||||
|
|
||||||
|
- name: Container config strategy for nova_novncproxy
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_novncproxy
|
||||||
|
action: "get_container_env"
|
||||||
|
register: nova_novncproxy_container_env
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- inventory_hostname in groups['nova-novncproxy']
|
||||||
|
|
||||||
|
- name: Container config strategy for nova_spicehtml5proxy
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_spicehtml5proxy
|
||||||
|
action: "get_container_env"
|
||||||
|
register: nova_spicehtml5proxy_container_env
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- inventory_hostname in groups['nova-spicehtml5proxy']
|
||||||
|
|
||||||
|
- name: Remove the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
until: remote_container|success
|
||||||
|
retries: "{{ item[0]['retries']|default(0) }}"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
# NOTE(Jeffrey4l): retry 1 to remove nova_libvirt container because when
|
||||||
|
# guests running, nova_libvirt will raise error even though it is removed.
|
||||||
|
- [{ name: nova_libvirt, group: compute, retries: 1 },
|
||||||
|
{ name: nova_ssh, group: compute },
|
||||||
|
{ name: nova_conductor, group: nova-conductor },
|
||||||
|
{ name: nova_api, group: nova-api },
|
||||||
|
{ name: nova_consoleauth, group: nova-consoleauth },
|
||||||
|
{ name: nova_scheduler, group: nova-scheduler }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- name: Remove nova_compute container
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_compute
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_nova_compute_container
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
- config_strategy == 'COPY_ONCE' or nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- nova_compute_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Remove nova_compute_ironic container
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_compute_ironic
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_nova_compute_ironic_container
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- inventory_hostname in groups['nova-compute-ironic']
|
||||||
|
- config_strategy == 'COPY_ONCE' or nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- nova_compute_ironic_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Remove nova_novncproxy container
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_novncproxy
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_nova_novncproxy_container
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- inventory_hostname in groups['nova-novncproxy']
|
||||||
|
- config_strategy == 'COPY_ONCE' or nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- nova_novncproxy_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Remove nova_spicehtml5proxy container
|
||||||
|
kolla_docker:
|
||||||
|
name: nova_spicehtml5proxy
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_nova_spicehtml5proxy_container
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- inventory_hostname in groups['nova-spicehtml5proxy']
|
||||||
|
- config_strategy == 'COPY_ONCE' or nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- nova_spicehtml5proxy_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- remove_nova_compute_container.changed
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- remove_nova_compute_ironic_container.changed
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- remove_nova_compute_ironic_container.changed
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- remove_nova_novncproxy_container.changed
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- remove_nova_spicehtml5proxy_container.changed
|
||||||
|
|
||||||
|
- name: Restart the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: nova_libvirt, group: compute },
|
||||||
|
{ name: nova_ssh, group: compute },
|
||||||
|
{ name: nova_conductor, group: nova-conductor },
|
||||||
|
{ name: nova_api, group: nova-api },
|
||||||
|
{ name: nova_consoleauth, group: nova-consoleauth },
|
||||||
|
{ name: nova_scheduler, group: nova-scheduler }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- name: Restart the nova_compute container
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_compute"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- not enable_nova_fake | bool
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
- nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- nova_compute_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Restart the nova_compute_ironic container
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_compute_ironic"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- enable_ironic | bool
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['nova-compute-ironic']
|
||||||
|
- nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- nova_compute_ironic_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Restart the nova_novncproxy container
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_novncproxy"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- nova_console == 'novnc'
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['nova-novncproxy']
|
||||||
|
- nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- nova_novncproxy_check_result['rc'] == 1
|
||||||
|
|
||||||
|
- name: Restart the nova_spicehtml5proxy container
|
||||||
|
kolla_docker:
|
||||||
|
name: "nova_spicehtml5proxy"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- nova_console == 'spice'
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- inventory_hostname in groups['nova-spicehtml5proxy']
|
||||||
|
- nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- nova_spicehtml5proxy_check_result['rc'] == 1
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rabbitmq, group: rabbitmq }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rabbitmq, group: rabbitmq }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rabbitmq, group: rabbitmq }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: rabbitmq, group: rabbitmq }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: rabbitmq, group: rabbitmq }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['rabbitmq']
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rabbitmq, group: rabbitmq }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rabbitmq, group: rabbitmq }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rabbitmq, group: rabbitmq }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: rabbitmq, group: rabbitmq }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: rabbitmq, group: rabbitmq }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rally, group: rally }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rally, group: rally }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: rally, group: rally }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: rally, group: rally }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: rally, group: rally }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,2 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rally, group: rally }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rally, group: rally }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: rally, group: rally }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: rally, group: rally }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: rally, group: rally }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: sahara_api, group: sahara-api }
|
|
||||||
- { name: sahara_engine, group: sahara-engine }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: sahara_api, group: sahara-api }
|
|
||||||
- { name: sahara_engine, group: sahara-engine }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: sahara_api, group: sahara-api }
|
|
||||||
- { name: sahara_engine, group: sahara-engine }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: sahara_api, group: sahara-api },
|
|
||||||
{ name: sahara_engine, group: sahara-engine },]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: sahara_api, group: sahara-api },
|
|
||||||
{ name: sahara_engine, group: sahara-engine },]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,69 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['sahara-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['sahara-engine']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: sahara_api, group: sahara-api }
|
||||||
|
- { name: sahara_engine, group: sahara-engine }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: sahara_api, group: sahara-api }
|
||||||
|
- { name: sahara_engine, group: sahara-engine }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: sahara_api, group: sahara-api }
|
||||||
|
- { name: sahara_engine, group: sahara-engine }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: sahara_api, group: sahara-api },
|
||||||
|
{ name: sahara_engine, group: sahara-engine },]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: sahara_api, group: sahara-api },
|
||||||
|
{ name: sahara_engine, group: sahara-engine },]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: senlin_api, group: senlin-api }
|
|
||||||
- { name: senlin_engine, group: senlin-engine }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: senlin_api, group: senlin-api }
|
|
||||||
- { name: senlin_engine, group: senlin-engine }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: senlin_api, group: senlin-api }
|
|
||||||
- { name: senlin_engine, group: senlin-engine }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: senlin_api, group: senlin-api },
|
|
||||||
{ name: senlin_engine, group: senlin-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: senlin_api, group: senlin-api },
|
|
||||||
{ name: senlin_engine, group: senlin-engine }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,4 +1,66 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['senlin-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['senlin-engine']
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: senlin_api, group: senlin-api }
|
||||||
|
- { name: senlin_engine, group: senlin-engine }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: senlin_api, group: senlin-api }
|
||||||
|
- { name: senlin_engine, group: senlin-engine }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: senlin_api, group: senlin-api }
|
||||||
|
- { name: senlin_engine, group: senlin-engine }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: senlin_api, group: senlin-api },
|
||||||
|
{ name: senlin_engine, group: senlin-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: senlin_api, group: senlin-api },
|
||||||
|
{ name: senlin_engine, group: senlin-engine }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,144 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: swift_account_server, group: swift-account-server }
|
|
||||||
- { name: swift_account_auditor, group: swift-account-server }
|
|
||||||
- { name: swift_account_replicator, group: swift-account-server }
|
|
||||||
- { name: swift_account_reaper, group: swift-account-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-account-server }
|
|
||||||
- { name: swift_container_server, group: swift-container-server }
|
|
||||||
- { name: swift_container_auditor, group: swift-container-server }
|
|
||||||
- { name: swift_container_replicator, group: swift-container-server }
|
|
||||||
- { name: swift_container_updater, group: swift-container-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-container-server }
|
|
||||||
- { name: swift_object_server, group: swift-object-server }
|
|
||||||
- { name: swift_object_auditor, group: swift-object-server }
|
|
||||||
- { name: swift_object_replicator, group: swift-object-server }
|
|
||||||
- { name: swift_object_updater, group: swift-object-server }
|
|
||||||
- { name: swift_object_expirer, group: swift-object-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-object-server }
|
|
||||||
- { name: swift_proxy_server, group: swift-proxy-server }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: swift_account_server, group: swift-account-server }
|
|
||||||
- { name: swift_account_auditor, group: swift-account-server }
|
|
||||||
- { name: swift_account_replicator, group: swift-account-server }
|
|
||||||
- { name: swift_account_reaper, group: swift-account-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-account-server }
|
|
||||||
- { name: swift_container_server, group: swift-container-server }
|
|
||||||
- { name: swift_container_auditor, group: swift-container-server }
|
|
||||||
- { name: swift_container_replicator, group: swift-container-server }
|
|
||||||
- { name: swift_container_updater, group: swift-container-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-container-server }
|
|
||||||
- { name: swift_object_server, group: swift-object-server }
|
|
||||||
- { name: swift_object_auditor, group: swift-object-server }
|
|
||||||
- { name: swift_object_replicator, group: swift-object-server }
|
|
||||||
- { name: swift_object_updater, group: swift-object-server }
|
|
||||||
- { name: swift_object_expirer, group: swift-object-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-object-server }
|
|
||||||
- { name: swift_proxy_server, group: swift-proxy-server }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: swift_account_server, group: swift-account-server }
|
|
||||||
- { name: swift_account_auditor, group: swift-account-server }
|
|
||||||
- { name: swift_account_replicator, group: swift-account-server }
|
|
||||||
- { name: swift_account_reaper, group: swift-account-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-account-server }
|
|
||||||
- { name: swift_container_server, group: swift-container-server }
|
|
||||||
- { name: swift_container_auditor, group: swift-container-server }
|
|
||||||
- { name: swift_container_replicator, group: swift-container-server }
|
|
||||||
- { name: swift_container_updater, group: swift-container-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-container-server }
|
|
||||||
- { name: swift_object_server, group: swift-object-server }
|
|
||||||
- { name: swift_object_auditor, group: swift-object-server }
|
|
||||||
- { name: swift_object_replicator, group: swift-object-server }
|
|
||||||
- { name: swift_object_updater, group: swift-object-server }
|
|
||||||
- { name: swift_object_expirer, group: swift-object-server }
|
|
||||||
- { name: swift_rsyncd, group: swift-object-server }
|
|
||||||
- { name: swift_proxy_server, group: swift-proxy-server }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: swift_account_server, group: swift-account-server },
|
|
||||||
{ name: swift_account_auditor, group: swift-account-server },
|
|
||||||
{ name: swift_account_replicator, group: swift-account-server },
|
|
||||||
{ name: swift_account_reaper, group: swift-account-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-account-server },
|
|
||||||
{ name: swift_container_server, group: swift-container-server },
|
|
||||||
{ name: swift_container_auditor, group: swift-container-server },
|
|
||||||
{ name: swift_container_replicator, group: swift-container-server },
|
|
||||||
{ name: swift_container_updater, group: swift-container-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-container-server },
|
|
||||||
{ name: swift_object_server, group: swift-object-server },
|
|
||||||
{ name: swift_object_auditor, group: swift-object-server },
|
|
||||||
{ name: swift_object_replicator, group: swift-object-server },
|
|
||||||
{ name: swift_object_updater, group: swift-object-server },
|
|
||||||
{ name: swift_object_expirer, group: swift-object-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-object-server },
|
|
||||||
{ name: swift_proxy_server, group: swift-proxy-server }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: swift_account_server, group: swift-account-server },
|
|
||||||
{ name: swift_account_auditor, group: swift-account-server },
|
|
||||||
{ name: swift_account_replicator, group: swift-account-server },
|
|
||||||
{ name: swift_account_reaper, group: swift-account-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-account-server },
|
|
||||||
{ name: swift_container_server, group: swift-container-server },
|
|
||||||
{ name: swift_container_auditor, group: swift-container-server },
|
|
||||||
{ name: swift_container_replicator, group: swift-container-server },
|
|
||||||
{ name: swift_container_updater, group: swift-container-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-container-server },
|
|
||||||
{ name: swift_object_server, group: swift-object-server },
|
|
||||||
{ name: swift_object_auditor, group: swift-object-server },
|
|
||||||
{ name: swift_object_replicator, group: swift-object-server },
|
|
||||||
{ name: swift_object_updater, group: swift-object-server },
|
|
||||||
{ name: swift_object_expirer, group: swift-object-server },
|
|
||||||
{ name: swift_rsyncd, group: swift-object-server },
|
|
||||||
{ name: swift_proxy_server, group: swift-proxy-server }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,6 +1,144 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['swift-account-server'] or
|
kolla_docker:
|
||||||
inventory_hostname in groups['swift-container-server'] or
|
name: "{{ item.name }}"
|
||||||
inventory_hostname in groups['swift-object-server'] or
|
action: "get_container_state"
|
||||||
inventory_hostname in groups['swift-proxy-server']
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: swift_account_server, group: swift-account-server }
|
||||||
|
- { name: swift_account_auditor, group: swift-account-server }
|
||||||
|
- { name: swift_account_replicator, group: swift-account-server }
|
||||||
|
- { name: swift_account_reaper, group: swift-account-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-account-server }
|
||||||
|
- { name: swift_container_server, group: swift-container-server }
|
||||||
|
- { name: swift_container_auditor, group: swift-container-server }
|
||||||
|
- { name: swift_container_replicator, group: swift-container-server }
|
||||||
|
- { name: swift_container_updater, group: swift-container-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-container-server }
|
||||||
|
- { name: swift_object_server, group: swift-object-server }
|
||||||
|
- { name: swift_object_auditor, group: swift-object-server }
|
||||||
|
- { name: swift_object_replicator, group: swift-object-server }
|
||||||
|
- { name: swift_object_updater, group: swift-object-server }
|
||||||
|
- { name: swift_object_expirer, group: swift-object-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-object-server }
|
||||||
|
- { name: swift_proxy_server, group: swift-proxy-server }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: swift_account_server, group: swift-account-server }
|
||||||
|
- { name: swift_account_auditor, group: swift-account-server }
|
||||||
|
- { name: swift_account_replicator, group: swift-account-server }
|
||||||
|
- { name: swift_account_reaper, group: swift-account-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-account-server }
|
||||||
|
- { name: swift_container_server, group: swift-container-server }
|
||||||
|
- { name: swift_container_auditor, group: swift-container-server }
|
||||||
|
- { name: swift_container_replicator, group: swift-container-server }
|
||||||
|
- { name: swift_container_updater, group: swift-container-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-container-server }
|
||||||
|
- { name: swift_object_server, group: swift-object-server }
|
||||||
|
- { name: swift_object_auditor, group: swift-object-server }
|
||||||
|
- { name: swift_object_replicator, group: swift-object-server }
|
||||||
|
- { name: swift_object_updater, group: swift-object-server }
|
||||||
|
- { name: swift_object_expirer, group: swift-object-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-object-server }
|
||||||
|
- { name: swift_proxy_server, group: swift-proxy-server }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: swift_account_server, group: swift-account-server }
|
||||||
|
- { name: swift_account_auditor, group: swift-account-server }
|
||||||
|
- { name: swift_account_replicator, group: swift-account-server }
|
||||||
|
- { name: swift_account_reaper, group: swift-account-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-account-server }
|
||||||
|
- { name: swift_container_server, group: swift-container-server }
|
||||||
|
- { name: swift_container_auditor, group: swift-container-server }
|
||||||
|
- { name: swift_container_replicator, group: swift-container-server }
|
||||||
|
- { name: swift_container_updater, group: swift-container-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-container-server }
|
||||||
|
- { name: swift_object_server, group: swift-object-server }
|
||||||
|
- { name: swift_object_auditor, group: swift-object-server }
|
||||||
|
- { name: swift_object_replicator, group: swift-object-server }
|
||||||
|
- { name: swift_object_updater, group: swift-object-server }
|
||||||
|
- { name: swift_object_expirer, group: swift-object-server }
|
||||||
|
- { name: swift_rsyncd, group: swift-object-server }
|
||||||
|
- { name: swift_proxy_server, group: swift-proxy-server }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: swift_account_server, group: swift-account-server },
|
||||||
|
{ name: swift_account_auditor, group: swift-account-server },
|
||||||
|
{ name: swift_account_replicator, group: swift-account-server },
|
||||||
|
{ name: swift_account_reaper, group: swift-account-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-account-server },
|
||||||
|
{ name: swift_container_server, group: swift-container-server },
|
||||||
|
{ name: swift_container_auditor, group: swift-container-server },
|
||||||
|
{ name: swift_container_replicator, group: swift-container-server },
|
||||||
|
{ name: swift_container_updater, group: swift-container-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-container-server },
|
||||||
|
{ name: swift_object_server, group: swift-object-server },
|
||||||
|
{ name: swift_object_auditor, group: swift-object-server },
|
||||||
|
{ name: swift_object_replicator, group: swift-object-server },
|
||||||
|
{ name: swift_object_updater, group: swift-object-server },
|
||||||
|
{ name: swift_object_expirer, group: swift-object-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-object-server },
|
||||||
|
{ name: swift_proxy_server, group: swift-proxy-server }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: swift_account_server, group: swift-account-server },
|
||||||
|
{ name: swift_account_auditor, group: swift-account-server },
|
||||||
|
{ name: swift_account_replicator, group: swift-account-server },
|
||||||
|
{ name: swift_account_reaper, group: swift-account-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-account-server },
|
||||||
|
{ name: swift_container_server, group: swift-container-server },
|
||||||
|
{ name: swift_container_auditor, group: swift-container-server },
|
||||||
|
{ name: swift_container_replicator, group: swift-container-server },
|
||||||
|
{ name: swift_container_updater, group: swift-container-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-container-server },
|
||||||
|
{ name: swift_object_server, group: swift-object-server },
|
||||||
|
{ name: swift_object_auditor, group: swift-object-server },
|
||||||
|
{ name: swift_object_replicator, group: swift-object-server },
|
||||||
|
{ name: swift_object_updater, group: swift-object-server },
|
||||||
|
{ name: swift_object_expirer, group: swift-object-server },
|
||||||
|
{ name: swift_rsyncd, group: swift-object-server },
|
||||||
|
{ name: swift_proxy_server, group: swift-proxy-server }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "telegraf"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec telegraf /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "telegraf"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "telegraf"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "telegraf"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
@ -1,2 +1,42 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "telegraf"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec telegraf /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "telegraf"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "telegraf"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "telegraf"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: tempest, group: tempest }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: tempest, group: tempest }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: tempest, group: tempest }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: tempest, group: tempest }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: tempest, group: tempest }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,2 +1,64 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: tempest, group: tempest }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: tempest, group: tempest }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: tempest, group: tempest }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: tempest, group: tempest }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: tempest, group: tempest }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure container is up
|
|
||||||
kolla_docker:
|
|
||||||
name: "vmtp"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups['vmtp']
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check configuration
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups['vmtp']
|
|
||||||
with_items:
|
|
||||||
- { name: vmtp, group: vmtp }
|
|
||||||
|
|
||||||
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
|
||||||
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
|
||||||
# just remove the container and start again
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "vmtp"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups['vmtp']
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "vmtp"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- config_strategy == "COPY_ONCE" or item[0]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[1]['rc'] == 1
|
|
||||||
- inventory_hostname in groups['vmtp']
|
|
||||||
with_together:
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "vmtp"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[1]['rc'] == 1
|
|
||||||
- inventory_hostname in groups['vmtp']
|
|
||||||
with_together:
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,3 +1,58 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensure container is up
|
||||||
|
kolla_docker:
|
||||||
|
name: "vmtp"
|
||||||
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
when: inventory_hostname in groups['vmtp']
|
when: inventory_hostname in groups['vmtp']
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check configuration
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups['vmtp']
|
||||||
|
with_items:
|
||||||
|
- { name: vmtp, group: vmtp }
|
||||||
|
|
||||||
|
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
|
||||||
|
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
|
||||||
|
# just remove the container and start again
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "vmtp"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups['vmtp']
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "vmtp"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- config_strategy == "COPY_ONCE" or item[0]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[1]['rc'] == 1
|
||||||
|
- inventory_hostname in groups['vmtp']
|
||||||
|
with_together:
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "vmtp"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[1]['rc'] == 1
|
||||||
|
- inventory_hostname in groups['vmtp']
|
||||||
|
with_together:
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensuring the containers up
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_state"
|
|
||||||
register: container_state
|
|
||||||
failed_when: container_state.Running == false
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: watcher_api, group: watcher-api }
|
|
||||||
- { name: watcher_engine, group: watcher-engine }
|
|
||||||
- { name: watcher_applier, group: watcher-applier }
|
|
||||||
|
|
||||||
- include: config.yml
|
|
||||||
|
|
||||||
- name: Check the configs
|
|
||||||
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: check_results
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: watcher_api, group: watcher-api }
|
|
||||||
- { name: watcher_engine, group: watcher-engine }
|
|
||||||
- { name: watcher_applier, group: watcher-applier }
|
|
||||||
|
|
||||||
- name: Containers config strategy
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
action: "get_container_env"
|
|
||||||
register: container_envs
|
|
||||||
when: inventory_hostname in groups[item.group]
|
|
||||||
with_items:
|
|
||||||
- { name: watcher_api, group: watcher-api }
|
|
||||||
- { name: watcher_engine, group: watcher-engine }
|
|
||||||
- { name: watcher_applier, group: watcher-applier }
|
|
||||||
|
|
||||||
- name: Remove the containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "remove_container"
|
|
||||||
register: remove_containers
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
with_together:
|
|
||||||
- [{ name: watcher_api, group: watcher-api },
|
|
||||||
{ name: watcher_engine, group: watcher-engine },
|
|
||||||
{ name: watcher_applier, group: watcher-applier }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
||||||
|
|
||||||
- include: start.yml
|
|
||||||
when: remove_containers.changed
|
|
||||||
|
|
||||||
- name: Restart containers
|
|
||||||
kolla_docker:
|
|
||||||
name: "{{ item[0]['name'] }}"
|
|
||||||
action: "restart_container"
|
|
||||||
when:
|
|
||||||
- config_strategy == 'COPY_ALWAYS'
|
|
||||||
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
|
||||||
- item[2]['rc'] == 1
|
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
|
||||||
with_together:
|
|
||||||
- [{ name: watcher_api, group: watcher-api },
|
|
||||||
{ name: watcher_engine, group: watcher-engine },
|
|
||||||
{ name: watcher_applier, group: watcher-applier }]
|
|
||||||
- "{{ container_envs.results }}"
|
|
||||||
- "{{ check_results.results }}"
|
|
@ -1,5 +1,71 @@
|
|||||||
---
|
---
|
||||||
- include: do_reconfigure.yml
|
- name: Ensuring the containers up
|
||||||
when: inventory_hostname in groups['watcher-api']
|
kolla_docker:
|
||||||
or inventory_hostname in groups['watcher-engine']
|
name: "{{ item.name }}"
|
||||||
or inventory_hostname in groups['watcher-applier']
|
action: "get_container_state"
|
||||||
|
register: container_state
|
||||||
|
failed_when: container_state.Running == false
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: watcher_api, group: watcher-api }
|
||||||
|
- { name: watcher_engine, group: watcher-engine }
|
||||||
|
- { name: watcher_applier, group: watcher-applier }
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- name: Check the configs
|
||||||
|
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: check_results
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: watcher_api, group: watcher-api }
|
||||||
|
- { name: watcher_engine, group: watcher-engine }
|
||||||
|
- { name: watcher_applier, group: watcher-applier }
|
||||||
|
|
||||||
|
- name: Containers config strategy
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
action: "get_container_env"
|
||||||
|
register: container_envs
|
||||||
|
when: inventory_hostname in groups[item.group]
|
||||||
|
with_items:
|
||||||
|
- { name: watcher_api, group: watcher-api }
|
||||||
|
- { name: watcher_engine, group: watcher-engine }
|
||||||
|
- { name: watcher_applier, group: watcher-applier }
|
||||||
|
|
||||||
|
- name: Remove the containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "remove_container"
|
||||||
|
register: remove_containers
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
with_together:
|
||||||
|
- [{ name: watcher_api, group: watcher-api },
|
||||||
|
{ name: watcher_engine, group: watcher-engine },
|
||||||
|
{ name: watcher_applier, group: watcher-applier }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
|
||||||
|
- include: start.yml
|
||||||
|
when: remove_containers.changed
|
||||||
|
|
||||||
|
- name: Restart containers
|
||||||
|
kolla_docker:
|
||||||
|
name: "{{ item[0]['name'] }}"
|
||||||
|
action: "restart_container"
|
||||||
|
when:
|
||||||
|
- config_strategy == 'COPY_ALWAYS'
|
||||||
|
- item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
|
||||||
|
- item[2]['rc'] == 1
|
||||||
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
|
with_together:
|
||||||
|
- [{ name: watcher_api, group: watcher-api },
|
||||||
|
{ name: watcher_engine, group: watcher-engine },
|
||||||
|
{ name: watcher_applier, group: watcher-applier }]
|
||||||
|
- "{{ container_envs.results }}"
|
||||||
|
- "{{ check_results.results }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user