kolla-ansible/ansible/roles/aodh/handlers/main.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

65 lines
2.1 KiB
YAML

---
- name: Restart aodh-api container
vars:
service_name: "aodh-api"
service: "{{ aodh_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart aodh-evaluator container
vars:
service_name: "aodh-evaluator"
service: "{{ aodh_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart aodh-listener container
vars:
service_name: "aodh-listener"
service: "{{ aodh_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart aodh-notifier container
vars:
service_name: "aodh-notifier"
service: "{{ aodh_services[service_name] }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"