mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixing bug with stopped state
This commit is contained in:
parent
844e90093b
commit
1c2d244964
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ If ($state) {
|
|||
}
|
||||
Set-Attr $result "changed" $true;
|
||||
}
|
||||
ElseIf ($state -eq "stopped" -and $svcName -ne "Stopped") {
|
||||
ElseIf ($state -eq "stopped" -and $svc.Status -ne "Stopped") {
|
||||
try {
|
||||
Stop-Service -Name $svcName -ErrorAction Stop
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue