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
I just tried to run a playbook on a machine where, inside a path in the PATH variable, there was a double-quote (") character that somehow slipped in at the end of a path. Looked something like this:
The consequence was an uncaught error in Test-Path used here:
[WARNING]: Error when collecting facter facts: Test-Path : Illegales Zeichen im Pfad. In Zeile:10 Zeichen:17 +
Test-Path -LiteralPath $facterPath + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo :
InvalidArgument: (C:\Program File...bin"\facter.exe:String) [Test-Path], ArgumentException + FullyQualifiedErrorId :
ItemExistsArgumentError,Microsoft.PowerShell.Commands.TestPathCommand bei <ScriptBlock>, <Keine Datei>: Zeile 10 bei
<ScriptBlock>, <Keine Datei>: Zeile 3
Basically that says "illegal character in the path you're testing".
It's clearly an error on the target machine and should (and could) be fixed there. But nevertheless, ansible is going to run into this everytime and print this error message, which is IMHO anything from clear towards what the actual problem is.
In fact, ansible doesn't need to care at all - if the path is broken, there can't be an executable facter.exe there, so for that matter it's a NO and the loop should just continue testing with the next path.
Thx ;)
The text was updated successfully, but these errors were encountered:
J3ronimo
changed the title
InvalidArgument gathering facts if any folder in %PATH% is invalid
InvalidArgument gathering facts if a folder in %PATH% contains an invalid character
Jun 2, 2022
I just tried to run a playbook on a machine where, inside a path in the PATH variable, there was a double-quote (
"
) character that somehow slipped in at the end of a path. Looked something like this:The consequence was an uncaught error in
Test-Path
used here:Basically that says "illegal character in the path you're testing".
It's clearly an error on the target machine and should (and could) be fixed there. But nevertheless, ansible is going to run into this everytime and print this error message, which is IMHO anything from clear towards what the actual problem is.
In fact, ansible doesn't need to care at all - if the path is broken, there can't be an executable
facter.exe
there, so for that matter it's a NO and the loop should just continue testing with the next path.Thx ;)
The text was updated successfully, but these errors were encountered: