Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Done
-
None
-
None
-
None
-
Windows 2016 Servers in Hydra demo environment
-
Modules
-
Manual Test
-
39590,39965
-
2
-
Needs Assessment
Description
Basic Info
Module Version: 0.4.0
Puppet Version: 6.10.1
OS Name/Version: Windows Server 2016 Datacenter
When running the task "facter_task" on the windows systems in our hydra environment the following error is returned "Error: 765: unexpected token at ''. I looked into this a bit and it appears that with the -p included in the command, the Open3.capture3 function is returning a valid status but an empty string. So when JSON.parse attempts to do it's thing that error is returned.
If you remove the -p option from the command, the task executes correctly.
Finally, if you run the full command 'C:\Program Files\Puppet Labs\Puppet\bin\facter.bat -p --json' directly from the CLI it returns the full json, properly formatted.
Desired Behavior: Task should return valid JSON from facter.bat script.
Actual Behavior: throws error because of an empty string being parsed.
Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.