You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the roles failed to run with INJECT_FACTS_AS_VARS set to false as the required ansible_* variables (e.g. ansible_os_family) are not defined.
The configuration INJECT_FACTS_AS_VARS and the Ansible fact namespace ansible_facts.* has 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.
Therefore, it would be great if the collections supported INJECT_FACTS_AS_VARS=false as well.
To fix this just change all ansible_* variables to ansible_facts.*. As the minimum supported ansible version of this collection is 2.9 I expect it should continue to work after the change. I can do a PR when I have time.
The text was updated successfully, but these errors were encountered:
Currently, the roles failed to run with
INJECT_FACTS_AS_VARS
set tofalse
as the requiredansible_*
variables (e.g.ansible_os_family
) are not defined.The configuration
INJECT_FACTS_AS_VARS
and the Ansible fact namespaceansible_facts.*
has been added in Ansible 2.5. In the porting guide of that version it stated that:It was also confirmed by Ansible developer on reddit that
INJECT_FACTS_AS_VARS
was planned to be deprecated in the future.Therefore, it would be great if the collections supported
INJECT_FACTS_AS_VARS=false
as well.To fix this just change all
ansible_*
variables toansible_facts.*
. As the minimum supported ansible version of this collection is 2.9 I expect it should continue to work after the change. I can do a PR when I have time.The text was updated successfully, but these errors were encountered: