-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC-212 Test out different resource docs layout
Signed-off-by: Ian Maddaus <[email protected]>
- Loading branch information
Showing
13 changed files
with
260 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
**Install an alternative**: | ||
|
||
```ruby | ||
alternatives 'python install 2' do | ||
link_name 'python' | ||
path '/usr/bin/python2.7' | ||
priority 100 | ||
action :install | ||
end | ||
``` | ||
|
||
**Set an alternative**: | ||
|
||
```ruby | ||
alternatives 'python set version 3' do | ||
link_name 'python' | ||
path '/usr/bin/python3' | ||
action :set | ||
end | ||
``` | ||
|
||
**Set the automatic alternative state**: | ||
|
||
```ruby | ||
alternatives 'python auto' do | ||
link_name 'python' | ||
action :auto | ||
end | ||
``` | ||
|
||
**Refresh an alternative**: | ||
|
||
```ruby | ||
alternatives 'python refresh' do | ||
link_name 'python' | ||
action :refresh | ||
end | ||
``` | ||
|
||
**Remove an alternative**: | ||
|
||
```ruby | ||
alternatives 'python remove' do | ||
link_name 'python' | ||
path '/usr/bin/python3' | ||
action :remove | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Use the **alternatives** resource to configure command alternatives in | ||
Linux using the alternatives or update-alternatives packages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
**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 %w(package1 package2 package3) | ||
``` | ||
|
||
**Install without using recommend packages as a dependency**: | ||
|
||
```ruby | ||
package 'apache2' do | ||
options '--no-install-recommends' | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Use the **apt_package** resource to manage packages on Debian, Ubuntu, | ||
and other platforms that use the APT package system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
An **apt_package** resource block manages a package on a node, | ||
typically by installing it. The simplest use of the **apt_package** resource is: | ||
|
||
```ruby | ||
apt_package 'package_name' | ||
``` | ||
|
||
which will install the named package using all of the default options and the default action of `:install`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
In many cases, it is better to use the **package** resource instead of | ||
this one. This is because when the **package** resource is used in a | ||
recipe, Chef Infra Client will use details that are collected by Ohai at | ||
the start of a Chef Infra Client run to determine the correct package | ||
application. Using the **package** resource allows a recipe to be | ||
authored in a way that allows it to be used across many platforms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This resource block does not act unless notified by another resource to | ||
take action. Once notified, this resource block either runs immediately | ||
or is queued up to run at the end of a Chef Infra Client run. |
Oops, something went wrong.