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

Change-Id: I14d862aa599915c781d02b71a0e57d2124de9abc
2021-02-21 07:05:46 -05:00

19 lines
635 B
YAML

---
- name: Check magnum 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) }}"
environment: "{{ item.value.environment }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ magnum_services }}"
notify:
- "Restart {{ item.key }} container"