diff options
author | Tim Smith <tsmith@chef.io> | 2017-12-05 21:59:47 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-12-05 21:59:47 -0800 |
commit | 2b32e2e51ca3e4e22de1bc6f508a375ecdc109ed (patch) | |
tree | 527db97028e04c13f65670097aafd22c2a2960c1 | |
parent | 3a84ad116fc7f7c1d3f60c6c82e2f8bd9616a652 (diff) | |
download | chef-2b32e2e51ca3e4e22de1bc6f508a375ecdc109ed.tar.gz |
Add debug logging for the task existing
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/provider/windows_task.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index 4683a23264..5770e89b67 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -75,6 +75,7 @@ class Chef def action_create if current_resource.exists + Chef::Log.debug "#{new_resource} task exists." if !(task_need_update? || new_resource.force) Chef::Log.info "#{new_resource} task already exists - nothing to do" return @@ -129,6 +130,7 @@ class Chef def action_run if current_resource.exists + Chef::Log.debug "#{new_resource} task exists." if current_resource.status == :running Chef::Log.info "#{new_resource} task is currently running, skipping run" else @@ -143,6 +145,7 @@ class Chef def action_delete if current_resource.exists + Chef::Log.debug "#{new_resource} task exists." # always need to force deletion run_schtasks "DELETE", "F" => "" new_resource.updated_by_last_action true @@ -154,6 +157,7 @@ class Chef def action_end if current_resource.exists + Chef::Log.debug "#{new_resource} task exists." if current_resource.status != :running Chef::Log.debug "#{new_resource} is not running - nothing to do" else @@ -168,6 +172,7 @@ class Chef def action_enable if current_resource.exists + Chef::Log.debug "#{new_resource} task exists." if current_resource.enabled Chef::Log.debug "#{new_resource} already enabled - nothing to do" else @@ -183,6 +188,7 @@ class Chef def action_disable if current_resource.exists + Chef::Log.info "#{new_resource} task exists." if current_resource.enabled run_schtasks "CHANGE", "DISABLE" => "" new_resource.updated_by_last_action true |