mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fixing bug with stopped state
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user