summaryrefslogtreecommitdiff
path: root/lib/chef/resource/plist.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/plist.rb')
-rw-r--r--lib/chef/resource/plist.rb27
1 files changed, 23 insertions, 4 deletions
diff --git a/lib/chef/resource/plist.rb b/lib/chef/resource/plist.rb
index 944eea18e9..06811ea8b6 100644
--- a/lib/chef/resource/plist.rb
+++ b/lib/chef/resource/plist.rb
@@ -28,14 +28,33 @@ class Chef
description "Use the **plist** resource to set config values in plist files on macOS systems."
introduced "16.0"
+ examples <<~DOC
+ **Show hidden files in finder**:
+
+ ```ruby
+ plist 'show hidden files' do
+ path '/Users/vagrant/Library/Preferences/com.apple.finder.plist'
+ entry 'AppleShowAllFiles'
+ value true
+ end
+ ```
+ DOC
+
+ property :path, String, name_property: true,
+ description: "The path on disk to the plist file."
- property :path, String, name_property: true
property :entry, String
property :value, [TrueClass, FalseClass, String, Integer, Float, Hash]
property :encoding, String, default: "binary"
- property :owner, String, default: "root"
- property :group, String, default: "wheel"
- property :mode, [String, Integer]
+
+ property :owner, String, default: "root",
+ description: "The owner of the plist file."
+
+ property :group, String, default: "wheel",
+ description: "The group of the plist file."
+
+ property :mode, [String, Integer],
+ description: "The file mode of the plist file. Ex: '644'"
PLISTBUDDY_EXECUTABLE = "/usr/libexec/PlistBuddy".freeze
DEFAULTS_EXECUTABLE = "/usr/bin/defaults".freeze