diff options
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." |