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

Change-Id: I2e18f2d912dad92a327261e092da358911531ebe
2021-03-03 09:44:00 +00:00

19 lines
625 B
YAML

---
- name: Check skydive containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
privileged: "{{ item.value.privileged | default(False) }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ skydive_services }}"
notify:
- "Restart {{ item.key }} container"