From 07f5d698331a6e2042f45c9d5dcf30aef5b428c6 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 24 Aug 2018 21:44:38 -0700 Subject: 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 --- lib/chef/resource/cron_d.rb | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.1