kolla-ansible/ansible/roles/tacker/handlers/main.yml
wuchunyang 7bab7d0d27 Use Docker healthchecks for tacker services
This change enables the use of Docker healthchecks for tacker
services.
Implements: blueprint container-health-check

Change-Id: Ib33863e4bf78f73a28d82b222ab349909ebb6671
2021-03-02 20:07:53 +08:00

33 lines
1.1 KiB
YAML

---
- name: Restart tacker-conductor container
vars:
service_name: "tacker-conductor"
service: "{{ tacker_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart tacker-server container
vars:
service_name: "tacker-server"
service: "{{ tacker_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"