Skip to content

Fix host resolution with minified inventory#2121

Merged
berendt merged 1 commit intomainfrom
fix-mini
Mar 13, 2026
Merged

Fix host resolution with minified inventory#2121
berendt merged 1 commit intomainfrom
fix-mini

Conversation

@berendt
Copy link
Copy Markdown
Member

@berendt berendt commented Mar 13, 2026

ansible-inventory --list does not populate _meta.hostvars for hosts without variables. The minified inventory has no host variables, so _meta.hostvars is always empty, breaking --limit and host listing.

Extract hosts from group listings as well via a new get_hosts_from_inventory() helper.

AI-assisted: Claude Code

ansible-inventory --list does not populate _meta.hostvars for hosts
without variables. The minified inventory has no host variables, so
_meta.hostvars is always empty, breaking --limit and host listing.

Extract hosts from group listings as well via a new
get_hosts_from_inventory() helper.

AI-assisted: Claude Code

Signed-off-by: Christian Berendt <berendt@osism.tech>
@berendt berendt merged commit 0a6b540 into main Mar 13, 2026
2 checks passed
@berendt berendt deleted the fix-mini branch March 13, 2026 18:50
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.

1 participant