diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-24 21:44:38 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-24 21:44:38 -0700 |
commit | 07f5d698331a6e2042f45c9d5dcf30aef5b428c6 (patch) | |
tree | 5d636f3f9a6c75472f523a4b7b9b20244357f698 | |
parent | fb4ceb1b44c2f2dfbece64f90278cf3a1ff35033 (diff) | |
download | chef-07f5d698331a6e2042f45c9d5dcf30aef5b428c6.tar.gz |
Add random_delay property to cron_d
This was released in cron cookbook 6.1. The template already supported it, but the property was missing.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/cron_d.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/resource/cron_d.rb b/lib/chef/resource/cron_d.rb index ba78008ab8..5dacc88fd4 100644 --- a/lib/chef/resource/cron_d.rb +++ b/lib/chef/resource/cron_d.rb @@ -158,6 +158,9 @@ class Chef description: "The octal mode of the generated crontab file.", default: "0600" + property :random_delay, Integer + description: "Start the job with a random number of minutes with the upper limit being this property." + # warn if someone passes the deprecated cookbook property def after_created raise ArgumentError, "The 'cookbook' property for the cron_d resource is no longer supported now that this resource ships in Chef itself." if new_resource.cookbook @@ -222,6 +225,7 @@ class Chef home: new_resource.home, shell: new_resource.shell, comment: new_resource.comment, + random_delay: new_resource.random_delay, environment: new_resource.environment ) action create_action |