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?
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?
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:
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.