kolla-ansible/ansible/roles/ceilometer/tasks/check-containers.yml
wuchunyang 48cd90a8d5 Use Docker healthchecks for ceilometer services
This change enables the use of Docker healthchecks for ceilometer
services.
Implements: blueprint container-health-check

Change-Id: Ieed654e694e9a0a63fd3f0906395bc7bf7c07552
2021-03-15 22:24:36 +08:00

19 lines
660 B
YAML

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