Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to snap_package resource. #14299

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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