I have an docker_container that creates a container with state started
(lets called this docker container Service). It has a volume_from another
container (lets call that container Volume). When the Volume container
changes to a new image, we need to recreate the Service container.
In ansible, I am trying to create a handler that simply has this:
- name: restart Service
docker_container:
name: Service
recreate: yes
state: started
When I run ansible, I get:
....
"user": null,
"uts": null,
"volume_driver": null,
"volumes": null,
"volumes_from": null
},
"module_name": "docker_container"
},
"msg": "Error creating container: 400 Client Error: Bad Request
(\"{\"message\":\"No command specified\"}\")"
Notice the volumes_from is null and so are all the other settings. Seeing
this, I tried copying the example in the ansible docker_container docs, and
I respecified ALL the options that we have in the task that initially
creates the docker container. And it does the exact same thing.
Is there a trick to setting up a task handler that simply recreates the
docker container?
Thanks.
--
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/8b14f320-731f-4441-8902-8061f3a8c430%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.