summaryrefslogtreecommitdiff
path: root/lib/chef/provider/windows_task.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-01-16 11:19:15 -0800
committerGitHub <noreply@github.com>2019-01-16 11:19:15 -0800
commit064a7dbe5b3bc4e225f5d657638283f3fb8b9f95 (patch)
treedffdec96279d4e34de994786a40d0e4abff73fdd /lib/chef/provider/windows_task.rb
parent8f1eb51ed0b52fd8a2eedfa03e6dd2507c63fea8 (diff)
parentfec16ccf380af3ee514a04fd95e27226fc7cf011 (diff)
downloadchef-064a7dbe5b3bc4e225f5d657638283f3fb8b9f95.tar.gz
Merge pull request #8120 from chef/tasks
windows_task resource: allow non-system users without password for interactive tasks
Diffstat (limited to 'lib/chef/provider/windows_task.rb')
-rw-r--r--lib/chef/provider/windows_task.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb
index 0d77d8c939..1d77c6867b 100644
--- a/lib/chef/provider/windows_task.rb
+++ b/lib/chef/provider/windows_task.rb
@@ -145,7 +145,7 @@ class Chef
task.working_directory = new_resource.cwd if new_resource.cwd
task.configure_settings(config_settings)
task.configure_principals(principal_settings)
- task.set_account_information(new_resource.user, new_resource.password)
+ task.set_account_information(new_resource.user, new_resource.password, new_resource.interactive_enabled)
task.creator = new_resource.user
task.description = new_resource.description unless new_resource.description.nil?
task.activate(new_resource.task_name)
@@ -246,7 +246,7 @@ class Chef
def update_task(task)
converge_by("#{new_resource} task updated") do
- task.set_account_information(new_resource.user, new_resource.password)
+ task.set_account_information(new_resource.user, new_resource.password, new_resource.interactive_enabled)
task.application_name = new_resource.command if new_resource.command
task.parameters = new_resource.command_arguments if new_resource.command_arguments
task.working_directory = new_resource.cwd if new_resource.cwd