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

Change-Id: I2ec11544b0e9c66a1821bfe0f9a40a9e9d88033b
2021-03-03 11:08:16 +00:00

18 lines
562 B
YAML

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