summaryrefslogtreecommitdiff
path: root/lib/chef/resource/archive_file.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-09-09 22:52:17 -0700
committerTim Smith <tsmith84@gmail.com>2019-09-10 09:44:15 -0700
commitb18cbae1cdffe3ddbfe2eeabb227303def1815dc (patch)
tree40672fcc7577d03f6555e3085c7ade8bf61dc57e /lib/chef/resource/archive_file.rb
parentb1a5a4f7e3eb30d30ebd1c5b9e22b299441350a1 (diff)
downloadchef-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/archive_file.rb')
-rw-r--r--lib/chef/resource/archive_file.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/resource/archive_file.rb b/lib/chef/resource/archive_file.rb
index 958da23a1b..0cf74bf3e5 100644
--- a/lib/chef/resource/archive_file.rb
+++ b/lib/chef/resource/archive_file.rb
@@ -30,6 +30,15 @@ class Chef
introduced "15.0"
description "Use the archive_file resource to extract archive files to disk. This resource uses the libarchive library to extract multiple archive formats including tar, gzip, bzip, and zip formats."
+ examples <<~DOC
+ Extract a zip file to a specified directory
+ ```ruby
+ archive_file 'Precompiled.zip' do
+ path '/tmp/Precompiled.zip'
+ destination '/srv/files'
+ end
+ ```
+ DOC
property :path, String,
name_property: true,