# Docker module state argument

**URL:** <https://forum.ansible.com/t/docker-module-state-argument/17800>\
**Category:** Ansible Project\
**Created:** [March 20, 2015, 3:59pm UTC](https://forum.ansible.com/t/docker-module-state-argument/17800 "2015-03-20T15:59:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cselden](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cselden/32/4405_2.png) [@cselden](https://forum.ansible.com/u/cselden)\
**Post date:** [March 20, 2015, 3:59pm UTC](https://forum.ansible.com/t/docker-module-state-argument/17800/1 "2015-03-20T15:59:22Z")

</div>

Community,

I’m using the docker module and the documentation appears to be wrong. I’m not sure where the right place is to bring this up.  
I’m running ansible version 1.8.2.

Ansible Documentation:  
[http://docs.ansible.com/docker\_module.html](http://docs.ansible.com/docker_module.html)

> **parameter** | **required** | **default** | **choices** |
> 
> - | - | - | - |

> state | no | started |   
> - present  
> - started  
> - reloaded  
> - restarted  
> - stopped  
> - killed  
> - absent  
> |
> 
> - | - | - | - |

Task:

- name: START | Start container  
docker:  
image={{item.value.image}}  
name={{item.value.name}}  
hostname={{item.value.name}}  
ports={{item.value.ports\_fwd}}  
expose={{item.value.ports\_exp}}  
publish\_all\_ports=True  
state=started

Error:

TASK: [startContainers | START | Start containers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
failed: [dockerhost2] =\> (item=(0, ‘tier1\_node1’)) =\> {“failed”: true, “item”: [0, “tier1\_node1”]}  
msg: value of state must be one of: absent,present,running,stopped,killed,restarted, got: started

I assume the documentation has gotten out of date, but there should be a note on the page for the module.

Thanks!  
Chip

---

<div class="post-metadata">

**Author:** ![Greg\_DeKoenigsberg1](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Greg\_DeKoenigsberg1](https://forum.ansible.com/u/Greg_DeKoenigsberg1)\
**Post date:** [March 20, 2015, 4:05pm UTC](https://forum.ansible.com/t/docker-module-state-argument/17800/2 "2015-03-20T16:05:35Z")

</div>

I can’t say whether it’s right or not, but this is a perfect opportunity to make a pull request with a recommended change. All of the docs are in Github. Docs live here:

[https://github.com/ansible/ansible/tree/devel/docsite/rst](https://github.com/ansible/ansible/tree/devel/docsite/rst)

–g

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 20, 2015, 4:08pm UTC](https://forum.ansible.com/t/docker-module-state-argument/17800/3 "2015-03-20T16:08:45Z")

</div>

I believe this was added to the latest docker module (devel) but the documentation was update w/o a ‘version added’.
