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 [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/5145e9f6-0aa0-45ee-af33-c50c37d82b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.