Docker module state argument

171 views
Skip to first unread message

Chip Selden

unread,
Mar 20, 2015, 11:59:23 AM3/20/15
to ansible...@googlegroups.com
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.


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

Greg DeKoenigsberg

unread,
Mar 20, 2015, 12:05:48 PM3/20/15
to ansible...@googlegroups.com
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:


--g

--
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/7ac3e715-8f07-4101-84cc-487df029d7b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg DeKoenigsberg
Ansible Community Guy

Find out why SD Times named Ansible
their #1 Company to Watch in 2015:
http://sdtimes.com/companies-watch-2015/

Brian Coca

unread,
Mar 20, 2015, 12:08:49 PM3/20/15
to ansible...@googlegroups.com
I believe this was added to the latest docker module (devel) but the documentation was update w/o a 'version added'.

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages