diff options
author | Vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2020-01-16 14:19:28 +0000 |
---|---|---|
committer | Vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2020-04-05 17:25:34 +0530 |
commit | 3e0dd389efe9cafaf8c6b6ee9185689175c2f3f1 (patch) | |
tree | 41d32611ddeb33f2039a2f4d05c7638ccfd3250d /lib | |
parent | 4051d899aadf6bc7d3246e768f058e59b59d7f08 (diff) | |
download | chef-3e0dd389efe9cafaf8c6b6ee9185689175c2f3f1.tar.gz |
Fix for windows task not idempotent on the windows19 and windows 16
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/windows_task.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index ec60a6c55c..73c6340f8f 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -326,9 +326,10 @@ class Chef # known issue : Since start_day and time is not mandatory while updating weekly frequency for which start_day is not mentioned by user idempotency # is not gettting maintained as new_resource.start_day is nil and we fetch the day of week from start_day to set and its currently coming as nil and don't match with current_task def task_needs_update?(task) + flag = false if new_resource.frequency == :none - flag = (task.account_information != new_resource.user || + flag = (task.author != new_resource.user || task.application_name != new_resource.command || description_needs_update?(task) || task.parameters != new_resource.command_arguments.to_s || @@ -352,7 +353,7 @@ class Chef current_task_trigger[:type] != new_task_trigger[:type] || current_task_trigger[:random_minutes_interval].to_i != new_task_trigger[:random_minutes_interval].to_i || current_task_trigger[:minutes_interval].to_i != new_task_trigger[:minutes_interval].to_i || - task.account_information.to_s.casecmp(new_resource.user.to_s) != 0 || + task.author.to_s.casecmp(new_resource.user.to_s) != 0 || task.application_name != new_resource.command || description_needs_update?(task) || task.parameters != new_resource.command_arguments.to_s || |