mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
caught out by syntax
This commit is contained in:
@@ -50,8 +50,8 @@ else
|
||||
try
|
||||
{
|
||||
$tasks = Get-ScheduledTask -TaskPath $name
|
||||
$tasks_needing_changing |? { $_.State -ne $state }
|
||||
if ($tasks_needing_changing -eq $null)
|
||||
$tasks_needing_changing = $tasks |? { $_.State -ne $state }
|
||||
if (-not($tasks_needing_changing -eq $null))
|
||||
{
|
||||
if ($state -eq 'Disabled')
|
||||
{
|
||||
@@ -69,6 +69,7 @@ try
|
||||
Set-Attr $result "tasks_changed" @()
|
||||
$result.changed = $false
|
||||
}
|
||||
|
||||
Exit-Json $result;
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user