kolla-ansible/ansible/roles/trove/tasks/check-containers.yml
LinPeiWen 2518e926d9 Use Docker healthchecks for trove services
This change enables the use of Docker healthchecks for trove services.
Implements: blueprint container-health-check

Change-Id: I55badd93f92f82e020ef80b06c788600e597d068
2021-03-02 11:42:34 +00:00

18 lines
585 B
YAML

---
- name: Check trove containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ trove_services }}"
notify:
- "Restart {{ item.key }} container"