kolla-ansible/ansible/roles/memcached/handlers/main.yml
Pavel Glushchak 2fde95ca08 fixed memcached is not restarted when config changed
That's because instead of start_container we need to
use recreate_or_restart_container in handler.

Change-Id: I3bb0a4c38b9024b2e2e26bfc06cb143bb5d35317
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2018-10-26 18:32:37 +03:00

19 lines
588 B
YAML

---
- name: Restart memcached container
vars:
service: "{{ memcached_services.memcached }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
image: "{{ service.image }}"
name: "{{ service.container_name }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
when:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
- service.enabled | bool
- memcached_config_json.changed | bool
or check_memcached_container.changed | bool