diff options
author | vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2018-05-22 12:04:06 +0530 |
---|---|---|
committer | vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2018-06-14 12:08:35 +0530 |
commit | f1f52fce9d163ea8e85e88bdb3b9771509292b4c (patch) | |
tree | a0e87b829b98f9ea14bf33b9dffb5b064123911d | |
parent | 0a2f9d6b693b8d31e500f20b03710261b348917e (diff) | |
download | chef-f1f52fce9d163ea8e85e88bdb3b9771509292b4c.tar.gz |
Fix for windows_task getting created when wrong username and password provided and throws error afterwards
Signed-off-by: vasu1105 <vasundhara.jagdale@msystechnologies.com>
-rw-r--r-- | lib/chef/provider/windows_task.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index 0bb28c66c6..95840ac791 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -133,10 +133,10 @@ class Chef converge_by("#{new_resource} task created") do task = TaskScheduler.new if new_resource.frequency == :none - task.new_work_item(new_resource.task_name, {}) + task.new_work_item(new_resource.task_name, {}, { user: new_resource.user, password: new_resource.password }) task.activate(new_resource.task_name) else - task.new_work_item(new_resource.task_name, trigger) + task.new_work_item(new_resource.task_name, trigger, { user: new_resource.user, password: new_resource.password }) end task.application_name = new_resource.command task.parameters = new_resource.command_arguments if new_resource.command_arguments |