kolla-ansible/ansible/roles/memcached/tasks/config.yml
Michal (inc0) Jastrzebski 34ce7aad5a Limit check containers to reconfigure action
Genconfig doesn't require running containers or even docker installed.
This caused issues in kolla-k8s gates. Let's limit this task to
reconfigure.

Change-Id: I41265ea8d255aca59d73c1582486ed1e7885a829
2017-01-05 00:14:35 -05:00

34 lines
932 B
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
with_items:
- "memcached"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
register: memcached_config_json
with_items:
- "memcached"
notify: Restart memcached container
- name: Check memcached container
vars:
service: "{{ memcached_services.memcached }}"
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
register: check_memcached_container
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- action != "genconfig"
notify: Restart memcached container