diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-09-09 22:52:17 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-09-10 09:44:15 -0700 |
commit | b18cbae1cdffe3ddbfe2eeabb227303def1815dc (patch) | |
tree | 40672fcc7577d03f6555e3085c7ade8bf61dc57e /lib/chef/resource/chocolatey_source.rb | |
parent | b1a5a4f7e3eb30d30ebd1c5b9e22b299441350a1 (diff) | |
download | chef-examples.tar.gz |
Add more resource examples to the codebaseexamples
I'm also adding these same examples to the docs.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/chocolatey_source.rb')
-rw-r--r-- | lib/chef/resource/chocolatey_source.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/chef/resource/chocolatey_source.rb b/lib/chef/resource/chocolatey_source.rb index 9f57e0dbdc..3edb9cb435 100644 --- a/lib/chef/resource/chocolatey_source.rb +++ b/lib/chef/resource/chocolatey_source.rb @@ -21,6 +21,21 @@ class Chef description "Use the chocolatey_source resource to add, remove, enable, or disable Chocolatey sources." introduced "14.3" + examples <<~DOC + Add a Chocolatey source + ```ruby + chocolatey_source 'MySource' do + source 'http://example.com/something' + action :add + end + ``` + Remove a Chocolatey source + ```ruby + chocolatey_source 'MySource' do + action :remove + end + ``` + DOC property :source_name, String, name_property: true, description: "An optional property to set the source name if it differs from the resource block's name." |