kolla-ansible/ansible/roles/redis/tasks/check-containers.yml
Michal Arbet 257ef9fae8 Fix redis_sentinel container restarts
Redis Sentinel modifies its config.
Since we now check config in check-containers,
the redis_sentintel container is restarted each time.

This patch together with kolla patch fixes this issue.

Closes-Bug: #1967664
Depends-On: https://review.opendev.org/c/openstack/kolla/+/840954
Change-Id: Ia76329cb851d266cd888f51b7f70a4cdc40e3ac3
2022-05-13 20:28:13 +02:00

19 lines
616 B
YAML

---
- name: Check redis containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
environment: "{{ item.environment | default(omit) }}"
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: "{{ redis_services }}"
notify:
- "Restart {{ item.key }} container"