Skip to content

Commit

Permalink
Add examples to snap_package resource. (#14299)
Browse files Browse the repository at this point in the history
Signed-off-by: William Theaker <wtheaker@nvidia.com>
  • Loading branch information
williamtheaker committed Mar 26, 2024
1 parent c61f622 commit 23bc46c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/chef/resource/snap_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ class SnapPackage < Chef::Resource::Package

description "Use the **snap_package** resource to manage snap packages on Debian and Ubuntu platforms."
introduced "15.0"
examples <<~DOC
**Install a package**
```ruby
snap_package 'hello'
```
**Upgrade a package**
```ruby
snap_package 'hello' do
action :upgrade
end
```
**Install a package with classic confinement**
```ruby
snap_package 'hello' do
options 'classic'
end
```
DOC

allowed_actions :install, :upgrade, :remove, :purge

Expand Down

0 comments on commit 23bc46c

Please sign in to comment.