Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
As you’ve seen, Ansible is overly verbose when looping over a hashed variable and will print out its entire contents. (See this GitHub issue for other examples and some general work-a-rounds.)
How I’ve gotten around this in the past is to use Jinja’s map filter on the results to just grab the value I want. For example, to just have the IP address:
- debug:
msg="IP is {{ item }}"
with_items:
- "{{ droplet.results|map(attribute='droplet.ip_address')|list }}"
This produces the output:
TASK [debug] *****************************************************************************************
ok: [localhost] => (item=XXX.XXX.XX.XXX) => {
"changed": false,
"item": "XXX.XXX.XX.XXX",
"msg": "IP is XXX.XXX.XX.XXX"
}
ok: [localhost] => (item=XXX.XXX.XX.XXX) => {
"changed": false,
"item": "XXX.XXX.XX.XXX",
"msg": "IP is XXX.XXX.XX.XXX"
}
Which is still a bit more verbose than desired, but much more reasonable to deal with.