Hi, 

I have an ansible tasklist that generates a cfg file from a template first 
and then starts a docker container using that cfg file as a volume. 

Works fine. 

But when the generated cfg file changes (cfg file is actually generated 
from ansible inventory) , the docker container is not restarted, since from 
docker perspective nothing changed.Is there a way to 'force' ansible to 
restart the container under cetain conditions ? 

Thanks, 

Koen

Cfg: 

---
- template: "src=members.conf.j2 dest={{ docker_host_dir }}/members.conf"
- name: balancer
  docker:
     name: balancer
     image: <...>
     state: reloaded
     net: "{{ docker_net }}"
     ports:
     - "8000:8000"
     volumes:
     - "{{ docker_host_dir 
}}/members.conf:/usr/local/apache2/conf/members.conf"

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b9fd8835-3f12-4fd9-a538-8c2c66c86ea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to