passing extra args to docker: task

3,568 views
Skip to first unread message

Dick Davies

unread,
Jun 14, 2014, 6:23:21 AM6/14/14
to ansible list
I have a container I need to run on the host IP,
so I need to pass '--net="host"' to the docker run command.

Can't see any params I can pass to an Ansible docker:
task to do that, is there something I'm missing?

Matt Martz

unread,
Jun 14, 2014, 9:16:53 AM6/14/14
to ansible...@googlegroups.com
Ansible does not call the docker cli. It uses docker-py, so you cannot necessarily pass arbitrary command line arguments.

You are correct that this functionality does not exist in the ansible docker module currently, however there is an open pull request to add this functionality:

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK5eLPRN-LcWQoesxG9t0PXeQTUxT00vtZ1p_H4m8ckCGGWZ0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
ma...@sivel.net
http://sivel.net/

Michael DeHaan

unread,
Jun 15, 2014, 9:30:48 PM6/15/14
to ansible...@googlegroups.com
Aside:  Longer-term I'm waiting for there to be more decent "cloud-like" systems for pushing Docker systems around -- call this a scheduler, placement engine, whatever.

At this point the need for the Ansible "docker" module will be greatly reduced, and we'll have something more akin to the nova or ec2 or rackspace module to place containers.

Until then, we have this sucker, which I'm not neccessarily sure I'm content with the idea of it -- it feels like manually managing Xen or KVM instances without cloud software and having a list of which ones you are running on which machines.   



Reply all
Reply to author
Forward
0 new messages