# docker module wont link port (but shell will)

**URL:** <https://forum.ansible.com/t/docker-module-wont-link-port-but-shell-will/20383>\
**Category:** Ansible Project\
**Created:** [January 29, 2016, 12:04pm UTC](https://forum.ansible.com/t/docker-module-wont-link-port-but-shell-will/20383 "2016-01-29T12:04:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_C1](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@Mike\_C1](https://forum.ansible.com/u/Mike_C1)\
**Post date:** [January 29, 2016, 12:04pm UTC](https://forum.ansible.com/t/docker-module-wont-link-port-but-shell-will/20383/1 "2016-01-29T12:04:26Z")

</div>

Hi,

im running this[1] playbook against a server in order to start a logstash container, but i cannot get it to link the required ports.  
This[2] is the full log of that run and nothing seems to be wrong, but when i do a `docker ps` i cannot see the ports[3].

If i run the corresponding docker command via the `shell` module[4], everything is fine as well and the ports are showing up just fine in the list[5]  
This is a bit strange because the kibana[6] task runs all right and the port link is created.

Im not sure if this is a bug or not since this is my first attempt to run docker from ansible.

Cheers,  
Mike

[1] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-elk-tasks-yml](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-elk-tasks-yml)  
[2] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker\_logstash-txt-with-docker-module](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker_logstash-txt-with-docker-module)  
[3] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker-ps-with-docker-module](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker-ps-with-docker-module)  
[4] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker\_logstash-txt-with-shell](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker_logstash-txt-with-shell)  
[5] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker-ps-with-shell](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-docker-ps-with-shell)  
[6] [https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-elk-tasks-yml-L40](https://gist.github.com/serialdoom/a8b9b31c9680bff13bb2#file-elk-tasks-yml-L40)
