Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion data/infra/resources/alternatives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ properties_list:
required: false
description_list:
- markdown: The priority of the alternative.
target_mode:
support: full
examples: |
**Install an alternative**:

Expand Down Expand Up @@ -110,4 +112,4 @@ examples: |
path '/usr/bin/python3'
action :remove
end
```
```
46 changes: 28 additions & 18 deletions data/infra/resources/apt_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ syntax_description: |
which will install the named package using all of the default options and the default action of `:install`.
syntax_full_code_block: |-
apt_package 'name' do
anchor_package_regex true, false # default value: false
default_release String
environment Hash # default value: {}
options String, Array
overwrite_config_files true, false # default value: false
package_name String, Array
response_file String
response_file_variables Hash # default value: {}
source String
timeout String, Integer
version String, Array
action Symbol # defaults to :install if not specified
anchor_package_regex true, false # default value: false
default_release String
environment Hash # default value: {}
options String, Array
overwrite_config_files true, false # default value: false
package_name String, Array
response_file String
response_file_variables Hash # default value: {}
source String
timeout String, Integer
version String, Array
action Symbol # defaults to :install if not specified
end
syntax_properties_list:
syntax_full_properties_list:
- "`apt_package` is the resource."
- "`name` is the name given to the resource block."
- "`action` identifies which steps Chef Infra Client will take to bring the node into
the desired state."
- "`anchor_package_regex`, `environment`, `default_release`, `options`, `overwrite_config_files`, `package_name`, `response_file`,
`response_file_variables`, `source`, `timeout`, and `version` are the properties
available to this resource."
- "`anchor_package_regex`, `default_release`, `environment`, `options`, `overwrite_config_files`,
`package_name`, `response_file`, `response_file_variables`, `source`, `timeout`,
and `version` are the properties available to this resource."
actions_list:
:nothing:
shortcode: resources_common_actions_nothing.md
Expand All @@ -68,9 +68,9 @@ properties_list:
default_value: 'false'
new_in: '18.3'
description_list:
- markdown: A Boolean flag that allows (`false`) or prevents (`true`) apt_package
from matching the named package with packages by regular expression if it can't
find a package with the exact same name.
- markdown: A Boolean flag that indicates whether the package name, which can be
a regular expression, must match the entire name of the package (true) or if
the regular expression is allowed to match a subset of the name (false).
- property: default_release
ruby_type: String
required: false
Expand Down Expand Up @@ -116,6 +116,11 @@ properties_list:
default_value: "{}"
description_list:
- markdown: A Hash of response file variables in the form of {'VARIABLE' => 'VALUE'}.
- property: source
ruby_type: String
required: false
description_list:
- markdown: The optional path to a package on the local file system.
- property: timeout
ruby_type: String, Integer
required: false
Expand All @@ -126,6 +131,11 @@ properties_list:
required: false
description_list:
- markdown: The version of a package to be installed or upgraded.
target_mode:
support: full
introduced: '15.1'
updated: '19.0'
description: Does not support the `response_file` property in Target Mode.
examples: |
**Install a package using package manager**:

Expand Down
4 changes: 3 additions & 1 deletion data/infra/resources/apt_preference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ syntax_full_code_block: |-
pin_priority String, Integer
action Symbol # defaults to :add if not specified
end
syntax_properties_list:
syntax_properties_list:
syntax_full_properties_list:
- "`apt_preference` is the resource."
- "`name` is the name given to the resource block."
Expand Down Expand Up @@ -57,6 +57,8 @@ properties_list:
description_list:
- markdown: Sets the Pin-Priority for a package. See <https://wiki.debian.org/AptPreferences>
for more details.
target_mode:
support: full
examples: |
**Pin libmysqlclient16 to a version 5.1.49-3**:

Expand Down
4 changes: 3 additions & 1 deletion data/infra/resources/apt_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ syntax_full_code_block: |-
frequency Integer # default value: 86400
action Symbol # defaults to :periodic if not specified
end
syntax_properties_list:
syntax_properties_list:
syntax_full_properties_list:
- "`apt_update` is the resource."
- "`name` is the name given to the resource block."
Expand All @@ -37,6 +37,8 @@ properties_list:
description_list:
- markdown: Determines how frequently (in seconds) APT repository updates are made.
Use this property when the `:periodic` action is specified.
target_mode:
support: full
examples: |
**Update the Apt repository at a specified interval**:

Expand Down
3 changes: 2 additions & 1 deletion data/infra/resources/archive_file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ syntax_full_code_block: |-
strip_components Integer # default value: 0
action Symbol # defaults to :extract if not specified
end
syntax_properties_list:
syntax_properties_list:
syntax_full_properties_list:
- "`archive_file` is the resource."
- "`name` is the name given to the resource block."
Expand Down Expand Up @@ -93,6 +93,7 @@ properties_list:
- markdown: Remove the specified number of leading path elements. Pathnames with
fewer elements will be silently skipped. This behaves similarly to tar's --strip-components
command line argument.
target_mode:
examples: |
**Extract a zip file to a specified directory**:

Expand Down
24 changes: 20 additions & 4 deletions data/infra/resources/bash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource_description_list:
in which they are run. Use `not_if` and `only_if` to guard this resource for idempotence.
syntax_full_code_block: |-
bash 'name' do
cgroup String
code String
command String, Array # default value: 'name' unless specified
creates String
Expand All @@ -32,21 +33,29 @@ syntax_full_code_block: |-
user String, Integer
action Symbol # defaults to :run if not specified
end
syntax_properties_list:
syntax_properties_list:
syntax_full_properties_list:
- "`bash` is the resource."
- "`name` is the name given to the resource block."
- "`action` identifies which steps Chef Infra Client will take to bring the node into
the desired state."
- "`code`, `command`, `creates`, `cwd`, `default_env`, `domain`, `elevated`, `environment`,
`flags`, `group`, `input`, `interpreter`, `live_stream`, `login`, `password`, `returns`,
`timeout`, and `user` are the properties available to this resource."
- "`cgroup`, `code`, `command`, `creates`, `cwd`, `default_env`, `domain`, `elevated`,
`environment`, `flags`, `group`, `input`, `interpreter`, `live_stream`, `login`,
`password`, `returns`, `timeout`, and `user` are the properties available to this
resource."
actions_list:
:nothing:
shortcode: resources_common_actions_nothing.md
:run:
markdown: Run a command. (default)
properties_list:
- property: cgroup
ruby_type: String
required: false
new_in: '19.0'
description_list:
- markdown: 'Linux only: Run the command within a specific cgroup, creating it if
it doesn''t exist.'
- property: code
ruby_type: String
required: true
Expand Down Expand Up @@ -126,6 +135,11 @@ properties_list:
new_in: '16.2'
description_list:
- markdown: An optional property to set the input sent to the command as STDIN.
- property: interpreter
ruby_type: String
required: false
description_list:
- markdown:
- property: live_stream
ruby_type: true, false
required: false
Expand Down Expand Up @@ -173,6 +187,8 @@ properties_list:
also be specified without a domain simply as user if the domain is instead specified
using the domain property. On Windows only, if this property is specified, the
password property must be specified.
target_mode:
support: full
examples: |
**Compile an application**

Expand Down
101 changes: 83 additions & 18 deletions data/infra/resources/batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resource_description_list:
run. Use `not_if` and `only_if` to guard this resource for idempotence.
syntax_full_code_block: |-
batch 'name' do
cgroup String
code String
command String, Array # default value: 'name' unless specified
creates String
Expand All @@ -39,23 +40,23 @@ syntax_full_properties_list:
- "`name` is the name given to the resource block."
- "`action` identifies which steps Chef Infra Client will take to bring the node into
the desired state."
- "`code`, `command`, `creates`, `cwd`, `default_env`, `domain`, `elevated`, `environment`,
`flags`, `group`, `input`, `interpreter`, `live_stream`, `login`, `password`, `returns`,
`timeout`, and `user` are the properties available to this resource."
- "`cgroup`, `code`, `command`, `creates`, `cwd`, `default_env`, `domain`, `elevated`,
`environment`, `flags`, `group`, `input`, `interpreter`, `live_stream`, `login`,
`password`, `returns`, `timeout`, and `user` are the properties available to this
resource."
actions_list:
:nothing:
shortcode: resources_common_actions_nothing.md
:run:
markdown: Run a batch file.
markdown: Run a command. (default)
properties_list:
- property: architecture
ruby_type: Symbol
- property: cgroup
ruby_type: String
required: false
new_in: '19.0'
description_list:
- markdown: 'The architecture of the process under which a script is executed. If a value is not provided,
Chef Infra Client defaults to the correct value for the architecture, as determined by Ohai.
An exception is raised when anything other than `:i386` is specified for a 32-bit process.
Possible values: `:i386` (for 32-bit processes) and `:x86_64` (for 64-bit processes).'
- markdown: 'Linux only: Run the command within a specific cgroup, creating it if
it doesn''t exist.'
- property: code
ruby_type: String
required: true
Expand All @@ -66,7 +67,11 @@ properties_list:
required: false
default_value: The resource block's name.
description_list:
- markdown: The name of the command to be executed.
- markdown: An optional property to set the command to be executed if it differs
from the resource block's name.
- note:
markdown: Use the **execute** resource to run a single command. Use multiple
**execute** resource blocks to run multiple commands.
- property: creates
ruby_type: String
required: false
Expand All @@ -77,6 +82,43 @@ properties_list:
required: false
description_list:
- markdown: The current working directory from which the command will be run.
- property: default_env
ruby_type: true, false
required: false
default_value: 'false'
new_in: '14.2'
description_list:
- markdown: When true this enables ENV magic to add path_sanity to the PATH and
force the locale to English+UTF-8 for parsing output
- property: domain
ruby_type: String
required: false
new_in: '12.21'
description_list:
- markdown: 'Windows only: The domain of the user specified by the user property.
If not specified, the username and password specified by the `user` and `password`
properties will be used to resolve that user against the domain in which the
system running Chef Infra Client is joined, or if that system is not joined
to a domain it will resolve the user as a local account on that system. An alternative
way to specify the domain is to leave this property unspecified and specify
the domain as part of the user property.'
- property: elevated
ruby_type: true, false
required: false
default_value: 'false'
new_in: '13.3'
description_list:
- markdown: |-
Determines whether the script will run with elevated permissions to circumvent User Access Control (UAC) from interactively blocking the process.
This will cause the process to be run under a batch login instead of an interactive login. The user running chef-client needs the 'Replace a process level token' and 'Adjust Memory Quotas for a process' permissions. The user that is running the command needs the 'Log on as a batch job' permission.
Because this requires a login, the user and password properties are required.
- property: environment
ruby_type: Hash
required: false
description_list:
- markdown: 'A Hash of environment variables in the form of `({''ENV_VARIABLE''
=> ''VALUE''})`. **Note**: These variables must exist for a command to be run
successfully.'
- property: flags
ruby_type: String
required: false
Expand All @@ -88,18 +130,41 @@ properties_list:
required: false
description_list:
- markdown: The group name or group ID that must be changed before running a command.
- property: guard_interpreter
ruby_type: Symbol
- property: input
ruby_type: String
required: false
default_value: :batch
new_in: '16.2'
description_list:
- markdown: 'When this property is set to `:batch`, the 64-bit version of the cmd.exe shell will be used to evaluate strings values for the not_if and only_if properties.
Set this value to `:default` to use the 32-bit version of the cmd.exe shell.'
- markdown: An optional property to set the input sent to the command as STDIN.
- property: interpreter
ruby_type: String
required: false
description_list:
- markdown: The script interpreter to use during code execution. Changing the default value of this property is not supported.
- markdown:
- property: live_stream
ruby_type: true, false
required: false
default_value: 'false'
description_list:
- markdown: Send the output of the command run by this execute resource block to
the Chef Infra Client event stream.
- property: login
ruby_type: true, false
required: false
default_value: 'false'
new_in: '17.0'
description_list:
- markdown: Use a login shell to run the commands instead of inheriting the existing
execution environment.
- property: password
ruby_type: String
required: false
new_in: '12.21'
description_list:
- markdown: 'Windows only: The password of the user specified by the user property.
This property is mandatory if user is specified on Windows and may only be specified
if user is specified. The sensitive property for this resource will automatically
be set to true if password is specified.'
- property: returns
ruby_type: Integer, Array
required: false
Expand All @@ -114,7 +179,7 @@ properties_list:
description_list:
- markdown: The amount of time (in seconds) a command is to wait before timing out.
- property: user
ruby_type: String
ruby_type: String, Integer
required: false
description_list:
- markdown: 'The user name of the user identity with which to launch the new process.
Expand Down
Loading