Skip to content

Consistently access facts via the ansible_facts.* namespace - #287

Closed
Normo wants to merge 3 commits into
geerlingguy:masterfrom
Normo:ansible-facts-namespace
Closed

Consistently access facts via the ansible_facts.* namespace#287
Normo wants to merge 3 commits into
geerlingguy:masterfrom
Normo:ansible-facts-namespace

Conversation

@Normo

@Normo Normo commented Aug 20, 2025

Copy link
Copy Markdown

Currently, the role failed to run with INJECT_FACTS_AS_VARS set to False as the required ansible_* variables are not defined.

The configuration variable INJECT_FACTS_AS_VARS and the Ansible fact namespace ansible_facts.* have been added in Ansible 2.5. In the porting guide of that version, it stated that:

A new configuration variable, inject_facts_as_vars, has been added to ansible.cfg. Its default setting, 'True', keeps the 2.4 behavior of facts variables being set in the old ansible_* locations (while also writing them to the new namespace). This variable is expected to be set to 'False' in a future release. When inject_facts_as_vars is set to False, you must refer to ansible_facts through the new ansible_facts.* namespace.

@Normo
Normo force-pushed the ansible-facts-namespace branch from c2e64a9 to 2c33b70 Compare August 20, 2025 08:52
@Normo
Normo marked this pull request as ready for review August 20, 2025 09:08
@github-actions

Copy link
Copy Markdown

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions Bot added the stale label Dec 26, 2025
@Normo
Normo force-pushed the ansible-facts-namespace branch from db95589 to 0081029 Compare January 5, 2026 08:19
@github-actions github-actions Bot removed the stale label Jan 9, 2026
@github-actions

Copy link
Copy Markdown

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions Bot added the stale label May 15, 2026
@github-actions

Copy link
Copy Markdown

This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@github-actions github-actions Bot closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant