summaryrefslogtreecommitdiff
path: root/lib/chef/resource/timezone.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-06-18 14:35:58 -0700
committerTim Smith <tsmith84@gmail.com>2020-06-18 14:35:58 -0700
commitf9a33ac5e42a29d7362bf4a55c8ac262c935651c (patch)
tree58d2252614a1e217a5fbbe6d0c234ca241c27476 /lib/chef/resource/timezone.rb
parent9230b00dd39481728576254f52d35424c0c40eb2 (diff)
downloadchef-f9a33ac5e42a29d7362bf4a55c8ac262c935651c.tar.gz
Add more examples to the resource code
Also update the sudo resource command description based on an escalation. The commands need to be the full path to the command not just the comand. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/timezone.rb')
-rw-r--r--lib/chef/resource/timezone.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb
index a7813ce9c2..468043aead 100644
--- a/lib/chef/resource/timezone.rb
+++ b/lib/chef/resource/timezone.rb
@@ -28,6 +28,21 @@ class Chef
description "Use the **timezone** resource to change the system timezone on Windows, Linux, and macOS hosts. Timezones are specified in tz database format, with a complete list of available TZ values for Linux and macOS here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones and for Windows here: https://ss64.com/nt/timezones.html."
introduced "14.6"
+ examples <<~DOC
+ **Set the timezone to UTC**
+
+ ```ruby
+ timezone 'UTC'
+ ```
+
+ **Set the timezone to UTC with a friendly resource name**
+
+ ```ruby
+ timezone 'Set the hosts timezone to UTC' do
+ timezone 'UTC'
+ end
+ ```
+ DOC
property :timezone, String,
description: "An optional property to set the timezone value if it differs from the resource block's name.",