Hi all!
I have what I think is a simple question. It pertains to what is visible/available in the "docker_containers" dictionary when running a run book.
Ok, so, what’s throwing me off is whether to use one of the following:
- name launch containers
docker: image=df02bd73464a count={{ start_containers_count }}
Or
- name launch containers
docker: image=df02bd73464a name=somename_{{item}}
with_sequence: count={{ start_containers_count }}
It is the first snippet that works for doing this next task:
- name: print container info
debug: msg="{{item['NetworkSettings']['IPAddress']}}"
with_items: docker_containers
Why? Because the latter results in “docker_containers” only having the last container’s information (last container launched), whereas the former gives me all of them.
It’s probably something really simple…
--
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/5145e9f6-0aa0-45ee-af33-c50c37d82b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0274085d-cb0d-4450-bf63-326e39df5658%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7ba6bb6e-db7b-4a27-b560-e895c0f9efc0%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8ac6673f-d563-42e6-832f-73c1bc8f3cef%40googlegroups.com.
Louis