diff --git a/lib/ansible/modules/extras/windows/win_nssm.ps1 b/lib/ansible/modules/extras/windows/win_nssm.ps1 index bf4e798fca..37a8430ec7 100644 --- a/lib/ansible/modules/extras/windows/win_nssm.ps1 +++ b/lib/ansible/modules/extras/windows/win_nssm.ps1 @@ -149,7 +149,9 @@ Function ParseAppParameters() [string]$appParameters ) - return ConvertFrom-StringData -StringData $appParameters.TrimStart("@").TrimStart("{").TrimEnd("}").Replace("; ","`n") + $escapedAppParameters = $appParameters.TrimStart("@").TrimStart("{").TrimEnd("}").Replace("; ","`n").Replace("\","\\") + + return ConvertFrom-StringData -StringData $escapedAppParameters } diff --git a/lib/ansible/modules/extras/windows/win_nssm.py b/lib/ansible/modules/extras/windows/win_nssm.py index 1f42f21f45..462f01edba 100644 --- a/lib/ansible/modules/extras/windows/win_nssm.py +++ b/lib/ansible/modules/extras/windows/win_nssm.py @@ -86,11 +86,6 @@ options: - Password to be used for service startup required: false default: null - password: - description: - - Password to be used for service startup - required: false - default: null start_mode: description: - If C(auto) is selected, the service will start at bootup. C(manual) means that the service will start only when another service needs it. C(disabled) means that the service will stay off, regardless if it is needed or not.