Windows setup module inconsistent with Linux setup module and custom fact_path #57974
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
has_pr
This issue has an associated PR.
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
system
System category
windows
Windows community
SUMMARY
We have set up a local facts directory at an alternate location on some of our machines because we do not have root access and cannot create the /etc/facts.d directory. We added the configuration fact_path= in the ansible.cfg file such that it points to the Linux location where we can create our custom facts. On Linux hosts that where the directory doesn't exist, everything works fine. On Windows hosts, the gather facts task fails with "The path does not exist. Typo?"
Note:
setup.ps1 has:
local.py (module_utils/facts/system/local.py) has
ISSUE TYPE
COMPONENT NAME
lib/modules/windows/setup.ps1
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Linux Redhat Enterprise 6 & 7, Windows 2016
STEPS TO REPRODUCE
Set fact_path in ansible.cfg to any linux path and run a task on a windows host.
EXPECTED RESULTS
Task skips local facts gathering on windows like it does on Linux
ACTUAL RESULTS
Windows Gather Facts fails
The text was updated successfully, but these errors were encountered: