diff --git a/data/infra/resources/apt_package.yaml b/data/infra/resources/apt_package.yaml index c29563c017..538af5f5ff 100644 --- a/data/infra/resources/apt_package.yaml +++ b/data/infra/resources/apt_package.yaml @@ -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 @@ -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: @@ -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 diff --git a/data/infra/resources/dnf_package.yaml b/data/infra/resources/dnf_package.yaml index f18bf3d095..7ad9906643 100644 --- a/data/infra/resources/dnf_package.yaml +++ b/data/infra/resources/dnf_package.yaml @@ -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 @@ -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: @@ -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 diff --git a/data/infra/resources/dpkg_package.yaml b/data/infra/resources/dpkg_package.yaml index 4742e70c32..8390c5d0dc 100644 --- a/data/infra/resources/dpkg_package.yaml +++ b/data/infra/resources/dpkg_package.yaml @@ -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 @@ -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: @@ -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 diff --git a/data/infra/resources/git.yaml b/data/infra/resources/git.yaml index e294e61512..b9aa937377 100644 --- a/data/infra/resources/git.yaml +++ b/data/infra/resources/git.yaml @@ -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 diff --git a/data/infra/resources/package.yaml b/data/infra/resources/package.yaml index e8a410f566..6b98371ad5 100644 --- a/data/infra/resources/package.yaml +++ b/data/infra/resources/package.yaml @@ -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 @@ -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: @@ -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 @@ -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 diff --git a/data/infra/resources/rpm_package.yaml b/data/infra/resources/rpm_package.yaml index 5378ef7070..030c699615 100644 --- a/data/infra/resources/rpm_package.yaml +++ b/data/infra/resources/rpm_package.yaml @@ -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 @@ -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: @@ -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 diff --git a/data/infra/resources/yum_package.yaml b/data/infra/resources/yum_package.yaml index 6f8976958b..6526f7448a 100644 --- a/data/infra/resources/yum_package.yaml +++ b/data/infra/resources/yum_package.yaml @@ -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 @@ -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: @@ -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