Docker container using ansible

Hi,

I am trying to create docker containers with the help of ansible playbook. Need help!

Thanks

Hi,

you will need to use the docker image module to ensure you have the needed docker image and then use the docker container module to create a new container and start it. However, there are serveral problems with the current version of ansible that may be in your way. I tried to work with docker through ansible a couple of days ago and I had to face all these bugs:

https://github.com/ansible/ansible-modules-core/issues/705

https://github.com/ansible/ansible-modules-core/issues/4770
https://github.com/ansible/ansible-modules-core/issues/3528
https://github.com/ansible/ansible-modules-core/issues/1220

If you dont want to wait for the new version with this fixes and also apply some workarounds, maybe you should use the command module and call docker directly.

Regards

quarta-feira, 19 de Outubro de 2016 às 17:07:24 UTC+2, jl2…@umbc.edu escreveu:

The relevant documentation may be found here: http://docs.ansible.com/ansible/docker_module.html

Best of luck!