kolla-ansible/ansible/roles/cloudkitty/tasks/check-containers.yml
wu.chunyang e6e7e4d5d6 Use Docker healthchecks for cloudkitty services
This change enables the use of Docker healthchecks for cloudkitty
services.
Implements: blueprint container-health-check

Change-Id: I19892035382ffff5200e88da53408a19e72c9d68
2021-01-07 23:15:53 +08:00

18 lines
595 B
YAML

---
- name: Check cloudkitty 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: "{{ cloudkitty_services }}"
notify:
- "Restart {{ item.key }} container"