LinPeiWen 66888bb7e0 Use Docker healthchecks for redis services
This change enables the use of Docker healthchecks for redis services.
Implements: blueprint container-health-check

Change-Id: I0590c5b22ef8eb733211b029cdd73a055d58af11
2021-03-03 07:06:39 +00:00

33 lines
1013 B
YAML

---
- name: Restart redis container
vars:
service_name: "redis"
service: "{{ redis_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 redis-sentinel container
vars:
service_name: "redis-sentinel"
service: "{{ redis_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"