Fix win_nssm credentials quoting (#48761)

* Fix win_nssm credentials quoting

Fix credential quoting for win_nssm after changes to the way nssm command is invoked in Ansible 2.7.1.

* Updating nssm command to update credentials to use Argv-ToString to properly escape password variable.

* Adding changelog fragment for fix of #48728.
This commit is contained in:
mattandes 2018-12-04 18:38:28 -06:00 committed by Jordan Borean
commit 15c5dbcc20
2 changed files with 3 additions and 1 deletions

View file

@ -403,7 +403,7 @@ Function Nssm-Update-Credentials
}
If ($nssm_result.stdout.split("`n`r")[0] -ne $fullUser) {
$cmd = "set ""$name"" ObjectName $fullUser '$password'"
$cmd = Argv-ToString @("set", $name, "ObjectName", $fullUser, $password)
$nssm_result = Nssm-Invoke $cmd
if ($nssm_result.rc -ne 0)