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

Change-Id: I344115580840f3aa3f872c6136492f7bd7b73db8
2021-04-08 07:07:16 +00:00

19 lines
614 B
YAML

---
- name: Check zookeeper 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 }}"
environment: "{{ item.value.environment }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ zookeeper_services }}"
notify:
- "Restart {{ item.key }} container"