diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-05-01 13:58:09 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-05-01 13:58:09 -0700 |
commit | a161b2b84669e343ed9004811496f401895344b9 (patch) | |
tree | 3922ffb88d96c87a88f94cfb77bd50805b7a8d1b /lib/chef/resource/apt_package.rb | |
parent | 6d5c8a528a8cd93335345aa27791f15bf1d7341b (diff) | |
download | chef-a161b2b84669e343ed9004811496f401895344b9.tar.gz |
Add examples to apt_package
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/apt_package.rb')
-rw-r--r-- | lib/chef/resource/apt_package.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/chef/resource/apt_package.rb b/lib/chef/resource/apt_package.rb index 9ecbbe9153..369330be9f 100644 --- a/lib/chef/resource/apt_package.rb +++ b/lib/chef/resource/apt_package.rb @@ -25,6 +25,35 @@ class Chef provides :apt_package, target_mode: true provides :package, platform_family: "debian", target_mode: true + examples <<~DOC + **Install a package using package manager**: + + ```ruby + apt_package 'name of package' do + action :install + end + ``` + + **Install a package without specifying the default action**: + + ```ruby + apt_package 'name of package' + ``` + + **Install multiple packages at once**: + + ```ruby + apt_package %(package1 package2 package3) + ``` + + **Install without using recommend packages as a dependency** + + ```ruby + package 'apache2' do + options '--no-install-recommends' + end + ``` + DOC description "Use the **apt_package** resource to manage packages on Debian and Ubuntu platforms." |