diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-03-23 18:27:54 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-03-23 18:27:54 -0700 |
commit | bd327ef2e98573c4f2e98c97306121b8e1045d18 (patch) | |
tree | e2607491f32751465ed976666ca7d0461a3d6073 | |
parent | 6bbc3ddf8dfa1e6c713269058c9a7544131fbda2 (diff) | |
download | chef-bd327ef2e98573c4f2e98c97306121b8e1045d18.tar.gz |
Let env vars be handled by the cron_d resource
There's no reason to try to handle this (incorrectly) here.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/chef_client_cron.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/resource/chef_client_cron.rb b/lib/chef/resource/chef_client_cron.rb index 829755b9ef..4266ffdcc8 100644 --- a/lib/chef/resource/chef_client_cron.rb +++ b/lib/chef/resource/chef_client_cron.rb @@ -136,15 +136,16 @@ class Chef end cron_d new_resource.job_name do - minute new_resource.minute - hour new_resource.hour - day new_resource.day - weekday new_resource.weekday - month new_resource.month - mailto new_resource.mailto if new_resource.mailto - user new_resource.user - comment new_resource.comment if new_resource.comment - command cron_command + minute new_resource.minute + hour new_resource.hour + day new_resource.day + weekday new_resource.weekday + month new_resource.month + environment new_resource.environment + mailto new_resource.mailto if new_resource.mailto + user new_resource.user + comment new_resource.comment if new_resource.comment + command cron_command end end @@ -166,7 +167,6 @@ class Chef def cron_command cmd = "" cmd << "/bin/sleep #{splay_sleep_time(new_resource.splay)}; " - cmd << "#{new_resource.environment} " unless new_resource.environment.empty? cmd << "#{new_resource.chef_binary_path} " cmd << "#{new_resource.daemon_options.join(" ")} " unless new_resource.daemon_options.empty? cmd << "#{new_resource.append_log_file ? ">>" : ">"} #{::File.join(new_resource.log_directory, new_resource.log_file_name)} 2>&1" |