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

Change-Id: Ic477ac77f7ea5c50de473382fb1ec63d78043267
2021-03-08 14:29:52 +00:00

18 lines
583 B
YAML

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