Skip to content

Conversation

@patchback
Copy link

@patchback patchback bot commented Oct 20, 2025

This is a backport of PR #3124 as merged into devel (61ce435).

Summary

Clarifies correct dict2items usage in playbook loops by showing that nested values
must be accessed via item.value.* (for example, item.value.gid) when looping over
a dict converted with dict2items.

Motivation

Addresses recurring confusion discussed in ansible/ansible#85897.

Changes

  • Updates playbook_guide/playbooks_loops.rst with a concise example and a “common mistake” note.

Notes

A prior attempt in ansible/ansible#85964 failed sanity because docs/docsite/rst/
and examples/ are obsolete in the core repo. This PR moves the content to the
correct documentation repository.

…to ansible#85897) (#3124)

* docs: clarify dict2items usage in loops with group module (follow-up to ansible#85897)

* docs: merge dict2items group example into existing section (per review)

* docs: replace tag_data example with nested server_configs dict example (per review)

(cherry picked from commit 61ce435)
@samccann samccann merged commit 6a6882b into stable-2.20 Oct 20, 2025
12 checks passed
@samccann samccann deleted the patchback/backports/stable-2.20/61ce435c0373bfdf21b96f66e89f4b618d698694/pr-3124 branch October 20, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants