kolla-ansible/ansible/roles/gnocchi/handlers/main.yml
LinPeiWen 3e9ad63187 Use Docker healthchecks for gnocchi services
This change enables the use of Docker healthchecks for gnocchi services.
Implements: blueprint container-health-check

Change-Id: Ib1eb766d061c376c0bdd693dd6ea1e5b3e3fc02a
2021-03-08 14:27:33 +00:00

49 lines
1.5 KiB
YAML

---
- name: Restart gnocchi-api container
vars:
service_name: "gnocchi-api"
service: "{{ gnocchi_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 }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart gnocchi-metricd container
vars:
service_name: "gnocchi-metricd"
service: "{{ gnocchi_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 }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"
- name: Restart gnocchi-statsd container
vars:
service_name: "gnocchi-statsd"
service: "{{ gnocchi_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 }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"