From dae8cfe0a9539474a8e17d87acc334fc1348bdc8 Mon Sep 17 00:00:00 2001 From: Michael Perzel Date: Tue, 21 Jul 2015 17:38:27 -0500 Subject: [PATCH] Remove accidental newlines --- .../modules/extras/windows/win_scheduled_task.ps1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/extras/windows/win_scheduled_task.ps1 b/lib/ansible/modules/extras/windows/win_scheduled_task.ps1 index e09544226d5..c54be17db46 100644 --- a/lib/ansible/modules/extras/windows/win_scheduled_task.ps1 +++ b/lib/ansible/modules/extras/windows/win_scheduled_task.ps1 @@ -168,23 +168,20 @@ try { if ($state -eq "present" -and $exists -eq $false){ $action = New-ScheduledTaskAction -Execute $execute - Register-ScheduledTask -Action $action -Trigger $trigger -TaskName $name -Description $ -description -TaskPath $path -Settings $settings + Register-ScheduledTask -Action $action -Trigger $trigger -TaskName $name -Description $description -TaskPath $path -Settings $settings $task = Get-ScheduledTask -TaskName $name Set-Attr $result "msg" "Added new task $name" $result.changed = $true } elseif($state -eq "present" -and $exists -eq $true) { - if ($task.Description -eq $description -and $task.TaskName -eq $name -and $task.TaskPat -h -eq $path -and $task.Actions.Execute -eq $execute -and $taskState -eq $enabled) { + if ($task.Description -eq $description -and $task.TaskName -eq $name -and $task.TaskPath -eq $path -and $task.Actions.Execute -eq $execute -and $taskState -eq $enabled) { #No change in the task yet Set-Attr $result "msg" "No change in task $name" } else { Unregister-ScheduledTask -TaskName $name -Confirm:$false $action = New-ScheduledTaskAction -Execute $execute - Register-ScheduledTask -Action $action -Trigger $trigger -TaskName $name -Descripti -on $description -TaskPath $path -Settings $settings + Register-ScheduledTask -Action $action -Trigger $trigger -TaskName $name -Description $description -TaskPath $path -Settings $settings $task = Get-ScheduledTask -TaskName $name Set-Attr $result "msg" "Updated task $name" $result.changed = $true