Skip to content

Update resources for Client 18.x #4458

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
13 changes: 11 additions & 2 deletions data/infra/resources/apt_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ 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
Expand All @@ -32,13 +33,13 @@ syntax_full_code_block: |-
version String, Array
action Symbol # defaults to :install if not specified
end
syntax_properties_list:
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`, `default_release`, `options`, `overwrite_config_files`, `package_name`, `response_file`,
- "`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."
actions_list:
Expand Down Expand Up @@ -75,6 +76,14 @@ properties_list:
required: false
description_list:
- markdown: 'The default release. For example: `stable`.'
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: options
ruby_type: String, Array
required: false
Expand Down
11 changes: 10 additions & 1 deletion data/infra/resources/dnf_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ syntax_full_code_block: |-
dnf_package 'name' do
allow_downgrade true, false # default value: true
arch String, Array
environment Hash # default value: {}
flush_cache Hash # default value: {"before"=>false, "after"=>false}
options String, Array
package_name String, Array
Expand All @@ -41,7 +42,7 @@ 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."
- "`allow_downgrade`, `arch`, `flush_cache`, `options`, `package_name`, `source`,
- "`allow_downgrade`, `arch`, `environment`, `flush_cache`, `options`, `package_name`, `source`,
`timeout`, and `version` are the properties available to this resource."
actions_list:
:nothing:
Expand Down Expand Up @@ -75,6 +76,14 @@ properties_list:
description_list:
- markdown: The architecture of the package to be installed or upgraded. This value
can also be passed as part of the package name.
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: flush_cache
ruby_type: Hash
required: false
Expand Down
11 changes: 10 additions & 1 deletion data/infra/resources/dpkg_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource_description_list:
syntax_full_code_block: |-
dpkg_package 'name' do
allow_downgrade true, false # default value: true
environment Hash # default value: {}
options String, Array
package_name String, Array
response_file String
Expand All @@ -36,7 +37,7 @@ 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."
- "`allow_downgrade`, `options`, `package_name`, `response_file`, `response_file_variables`,
- "`allow_downgrade`, `environment`, `options`, `package_name`, `response_file`, `response_file_variables`,
`source`, `timeout`, and `version` are the properties available to this resource."
actions_list:
:nothing:
Expand All @@ -50,6 +51,14 @@ actions_list:
markdown: Purge a package. This action typically removes the configuration files
as well as the package.
properties_list:
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: options
ruby_type: String, Array
required: false
Expand Down
11 changes: 2 additions & 9 deletions data/infra/resources/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,8 @@ properties_list:
ruby_type: String
required: false
description_list:
- markdown: 'Do a one-time checkout from git **or** use when a branch in the

upstream repository is named `deploy`. To prevent the **git**

resource from attempting to check out master from master, set

`enable_checkout` to `false` when using the `checkout_branch`

property. See `revision`.'
- markdown: Set this to use a local branch to avoid checking SHAs or tags to a detached
head state.
- property: depth
ruby_type: Integer
required: false
Expand Down
12 changes: 10 additions & 2 deletions data/infra/resources/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ syntax_properties_list:
and `''ubuntu'', ''debian''` will install it using the `apache2` package'
syntax_full_code_block: |-
package 'name' do
environment Hash
options String, Array
package_name String, Array
source String
Expand All @@ -80,7 +81,7 @@ 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."
- "`options`, `package_name`, `source`, `timeout`, and `version` are the properties
- "`environment`, `options`, `package_name`, `source`, `timeout`, and `version` are the properties
available to this resource."
actions_list:
:install:
Expand All @@ -104,7 +105,6 @@ properties_list:
default_value: 'true'
description_list:
- markdown: '**yum_package** resource only. Downgrade a package to satisfy

requested version requirements.'
- property: arch
ruby_type: String, Array
Expand All @@ -122,6 +122,14 @@ properties_list:
- markdown: '**apt_package** resource only. The default release. For example:

`stable`.'
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: flush_cache
ruby_type: Array
required: false
Expand Down
11 changes: 10 additions & 1 deletion data/infra/resources/rpm_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ resource_description_list:
syntax_full_code_block: |-
rpm_package 'name' do
allow_downgrade true, false # default value: true
environment Hash # default value: {}
options String, Array
package_name String
source String
Expand All @@ -23,7 +24,7 @@ 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."
- "`allow_downgrade`, `options`, `package_name`, `source`, `timeout`, and `version`
- "`allow_downgrade`, `environment`, `options`, `package_name`, `source`, `timeout`, and `version`
are the properties available to this resource."
actions_list:
:nothing:
Expand All @@ -42,6 +43,14 @@ properties_list:
default_value: 'true'
description_list:
- markdown: Allow downgrading a package to satisfy requested version requirements.
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: options
ruby_type: String, Array
required: false
Expand Down
11 changes: 10 additions & 1 deletion data/infra/resources/yum_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ syntax_full_code_block: |-
yum_package 'name' do
allow_downgrade true, false # default value: true
arch String, Array
environment Hash # default value: {}
flush_cache Hash # default value: {"before"=>false, "after"=>false}
options String, Array
package_name String, Array
Expand All @@ -35,7 +36,7 @@ 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."
- "`allow_downgrade`, `arch`, `flush_cache`, `options`, `package_name`, `source`,
- "`allow_downgrade`, `arch`, `environment`, `flush_cache`, `options`, `package_name`, `source`,
`timeout`, `version`, and `yum_binary` are the properties available to this resource."
actions_list:
:install:
Expand Down Expand Up @@ -68,6 +69,14 @@ properties_list:
description_list:
- markdown: The architecture of the package to be installed or upgraded. This value
can also be passed as part of the package name.
- property: environment
ruby_type: Hash
required: false
default_value: "{}"
new_in: '18.8'
description_list:
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
to be set before running the command.
- property: flush_cache
ruby_type: Hash
required: false
Expand Down