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:
parent
2bd6b1415b
commit
15c5dbcc20
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "win_nssm - Switched to Argv-ToString for escaping NSSM credentials (https://github.com/ansible/ansible/issues/48728)"
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue