Hello
Ansible 1.9 - docker-py 0.71 - docker version 1.4.1
I'm trying to do in a playbook this docker command line
docker run --name projetx -d -v
/Users/hleclerc/tmp/data/projetx/mysql:/var/lib/mysql *-p :3306* -e
MYSQL_ROOT_PASSWORD=pwd projetx/mysql
docker ps :
4876cb21a372 projetx/mysql:latest "/usr/local/bin/run" 4 seconds
ago Up 3 seconds 0.0.0.0:49193->3306/tcp projetx
A dynamic port is allocated
Here is the playbooks :
1:
- name: Starting MySQL container
docker:
detach: true
image: "projetx/mysql"
name: "projetx"
ports: "::3306"
env: "MYSQL_ROOT_PASSWORD=pwd"
volumes:
- "/Users/hleclerc/tmp/data/projetx/mysql:/var/lib/mysql"
With this syntax if i do a docker ps :
f84b89180678 projetx/mysql:latest "/usr/local/bin/run" About
a minute ago Up About a minute 3306/tcp
if i change ports with
ports: 3306
a docker ps will display
6cb9843603f7 projetx/mysql:latest "/usr/local/bin/run" 8 seconds
ago Up 7 seconds 0.0.0.0:0->3306/tcp
if i change ports with ':3306' i get this error from ansible
bind = ('0.0.0.0', int(parts[0]))
ValueError: invalid literal for int() with base 10: ''
How can i have a correct behaviour ?
in advance 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/ca311dfc-d734-440d-ae89-5244d5235322%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.