summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-14 19:55:29 -0800
committerTim Smith <tsmith@chef.io>2018-11-15 09:40:35 -0800
commit72f051cd4b29e7207f2ea9d8b56070fd9d534bca (patch)
treea13298c449e34f73b9bfc123bc658e3590e1055c
parent0a1f934f5b1af117cb1c04311a4c6e3469b16f4d (diff)
downloadchef-72f051cd4b29e7207f2ea9d8b56070fd9d534bca.tar.gz
Add descriptions to the cron resource
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/cron.rb35
-rw-r--r--lib/chef/resource/template.rb14
2 files changed, 38 insertions, 11 deletions
diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb
index 57cc483c8a..647853bd9f 100644
--- a/lib/chef/resource/cron.rb
+++ b/lib/chef/resource/cron.rb
@@ -134,14 +134,33 @@ class Chef
)
end
- property :time, Symbol, equal_to: Chef::Provider::Cron::SPECIAL_TIME_VALUES
- property :mailto, String
- property :path, String
- property :home, String
- property :shell, String
- property :command, String, identity: true
- property :user, String, default: "root"
- property :environment, Hash, default: lazy { Hash.new }
+ property :time, Symbol,
+ description: "A time interval. Possible values: :annually, :daily, :hourly, :midnight, :monthly, :reboot, :weekly, or :yearly.",
+ equal_to: Chef::Provider::Cron::SPECIAL_TIME_VALUES
+
+ property :mailto, String,
+ description: "Set the MAILTO environment variable."
+
+ property :path, String,
+ description: "Set the PATH environment variable."
+
+ property :home, String,
+ description: "Set the HOME environment variable."
+
+ property :shell, String,
+ description: "Set the SHELL environment variable."
+
+ property :command, String,
+ description: "The command to be run, or the path to a file that contains the command to be run.",
+ identity: true
+
+ property :user, String,
+ description: "The name of the user that runs the command. If the user property is changed, the original user for the crontab program continues to run until that crontab program is deleted. This property is not applicable on the AIX platform.",
+ default: "root"
+
+ property :environment, Hash,
+ description: "A Hash of environment variables in the form of ({'ENV_VARIABLE' => 'VALUE'}). (These variables must exist for a command to be run successfully.)",
+ default: lazy { Hash.new }
private
diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb
index 26e85cc679..bd8325f2c1 100644
--- a/lib/chef/resource/template.rb
+++ b/lib/chef/resource/template.rb
@@ -57,9 +57,17 @@ class Chef
)
end
- property :variables, Hash, default: lazy { Hash.new }
- property :cookbook, String
- property :local, [ TrueClass, FalseClass ], default: false
+ property :variables, Hash,
+ description: "The variables property of the template resource can be used to reference a partial template file by using a Hash.",
+ default: lazy { Hash.new }
+
+ property :cookbook, String,
+ description: "The cookbook in which a file is located (if it is not located in the current cookbook). The default value is the current cookbook.",
+ desired_state: false
+
+ property :local, [ TrueClass, FalseClass ],
+ default: false, desired_state: false,
+ description: "Load a template from a local path. By default, the chef-client loads templates from a cookbook’s /templates directory. When this property is set to true, use the source property to specify the path to a template on the local node."
# Declares a helper method to be defined in the template context when
# rendering.