Skip to content

Commit 5326bc8

Browse files
authored
Update resources for Client 18.x (#4458)
* Update Client 18 resources Signed-off-by: Ian Maddaus <[email protected]> * Update git resource Signed-off-by: Ian Maddaus <[email protected]> --------- Signed-off-by: Ian Maddaus <[email protected]>
1 parent fa5fb3b commit 5326bc8

File tree

7 files changed

+63
-17
lines changed

7 files changed

+63
-17
lines changed

data/infra/resources/apt_package.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ syntax_full_code_block: |-
2222
apt_package 'name' do
2323
anchor_package_regex true, false # default value: false
2424
default_release String
25+
environment Hash # default value: {}
2526
options String, Array
2627
overwrite_config_files true, false # default value: false
2728
package_name String, Array
@@ -32,13 +33,13 @@ syntax_full_code_block: |-
3233
version String, Array
3334
action Symbol # defaults to :install if not specified
3435
end
35-
syntax_properties_list:
36+
syntax_properties_list:
3637
syntax_full_properties_list:
3738
- "`apt_package` is the resource."
3839
- "`name` is the name given to the resource block."
3940
- "`action` identifies which steps Chef Infra Client will take to bring the node into
4041
the desired state."
41-
- "`anchor_package_regex`, `default_release`, `options`, `overwrite_config_files`, `package_name`, `response_file`,
42+
- "`anchor_package_regex`, `environment`, `default_release`, `options`, `overwrite_config_files`, `package_name`, `response_file`,
4243
`response_file_variables`, `source`, `timeout`, and `version` are the properties
4344
available to this resource."
4445
actions_list:
@@ -75,6 +76,14 @@ properties_list:
7576
required: false
7677
description_list:
7778
- markdown: 'The default release. For example: `stable`.'
79+
- property: environment
80+
ruby_type: Hash
81+
required: false
82+
default_value: "{}"
83+
new_in: '18.8'
84+
description_list:
85+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
86+
to be set before running the command.
7887
- property: options
7988
ruby_type: String, Array
8089
required: false

data/infra/resources/dnf_package.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ syntax_full_code_block: |-
2727
dnf_package 'name' do
2828
allow_downgrade true, false # default value: true
2929
arch String, Array
30+
environment Hash # default value: {}
3031
flush_cache Hash # default value: {"before"=>false, "after"=>false}
3132
options String, Array
3233
package_name String, Array
@@ -41,7 +42,7 @@ syntax_full_properties_list:
4142
- "`name` is the name given to the resource block."
4243
- "`action` identifies which steps Chef Infra Client will take to bring the node into
4344
the desired state."
44-
- "`allow_downgrade`, `arch`, `flush_cache`, `options`, `package_name`, `source`,
45+
- "`allow_downgrade`, `arch`, `environment`, `flush_cache`, `options`, `package_name`, `source`,
4546
`timeout`, and `version` are the properties available to this resource."
4647
actions_list:
4748
:nothing:
@@ -75,6 +76,14 @@ properties_list:
7576
description_list:
7677
- markdown: The architecture of the package to be installed or upgraded. This value
7778
can also be passed as part of the package name.
79+
- property: environment
80+
ruby_type: Hash
81+
required: false
82+
default_value: "{}"
83+
new_in: '18.8'
84+
description_list:
85+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
86+
to be set before running the command.
7887
- property: flush_cache
7988
ruby_type: Hash
8089
required: false

data/infra/resources/dpkg_package.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ resource_description_list:
1212
syntax_full_code_block: |-
1313
dpkg_package 'name' do
1414
allow_downgrade true, false # default value: true
15+
environment Hash # default value: {}
1516
options String, Array
1617
package_name String, Array
1718
response_file String
@@ -36,7 +37,7 @@ syntax_full_properties_list:
3637
- "`name` is the name given to the resource block."
3738
- "`action` identifies which steps Chef Infra Client will take to bring the node into
3839
the desired state."
39-
- "`allow_downgrade`, `options`, `package_name`, `response_file`, `response_file_variables`,
40+
- "`allow_downgrade`, `environment`, `options`, `package_name`, `response_file`, `response_file_variables`,
4041
`source`, `timeout`, and `version` are the properties available to this resource."
4142
actions_list:
4243
:nothing:
@@ -50,6 +51,14 @@ actions_list:
5051
markdown: Purge a package. This action typically removes the configuration files
5152
as well as the package.
5253
properties_list:
54+
- property: environment
55+
ruby_type: Hash
56+
required: false
57+
default_value: "{}"
58+
new_in: '18.8'
59+
description_list:
60+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
61+
to be set before running the command.
5362
- property: options
5463
ruby_type: String, Array
5564
required: false

data/infra/resources/git.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,8 @@ properties_list:
6262
ruby_type: String
6363
required: false
6464
description_list:
65-
- markdown: 'Do a one-time checkout from git **or** use when a branch in the
66-
67-
upstream repository is named `deploy`. To prevent the **git**
68-
69-
resource from attempting to check out master from master, set
70-
71-
`enable_checkout` to `false` when using the `checkout_branch`
72-
73-
property. See `revision`.'
65+
- markdown: Set this to use a local branch to avoid checking SHAs or tags to a detached
66+
head state.
7467
- property: depth
7568
ruby_type: Integer
7669
required: false

data/infra/resources/package.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ syntax_properties_list:
6868
and `''ubuntu'', ''debian''` will install it using the `apache2` package'
6969
syntax_full_code_block: |-
7070
package 'name' do
71+
environment Hash
7172
options String, Array
7273
package_name String, Array
7374
source String
@@ -80,7 +81,7 @@ syntax_full_properties_list:
8081
- "`name` is the name given to the resource block."
8182
- "`action` identifies which steps Chef Infra Client will take to bring the node into
8283
the desired state."
83-
- "`options`, `package_name`, `source`, `timeout`, and `version` are the properties
84+
- "`environment`, `options`, `package_name`, `source`, `timeout`, and `version` are the properties
8485
available to this resource."
8586
actions_list:
8687
:install:
@@ -104,7 +105,6 @@ properties_list:
104105
default_value: 'true'
105106
description_list:
106107
- markdown: '**yum_package** resource only. Downgrade a package to satisfy
107-
108108
requested version requirements.'
109109
- property: arch
110110
ruby_type: String, Array
@@ -122,6 +122,14 @@ properties_list:
122122
- markdown: '**apt_package** resource only. The default release. For example:
123123
124124
`stable`.'
125+
- property: environment
126+
ruby_type: Hash
127+
required: false
128+
default_value: "{}"
129+
new_in: '18.8'
130+
description_list:
131+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
132+
to be set before running the command.
125133
- property: flush_cache
126134
ruby_type: Array
127135
required: false

data/infra/resources/rpm_package.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ resource_description_list:
1010
syntax_full_code_block: |-
1111
rpm_package 'name' do
1212
allow_downgrade true, false # default value: true
13+
environment Hash # default value: {}
1314
options String, Array
1415
package_name String
1516
source String
@@ -23,7 +24,7 @@ syntax_full_properties_list:
2324
- "`name` is the name given to the resource block."
2425
- "`action` identifies which steps Chef Infra Client will take to bring the node into
2526
the desired state."
26-
- "`allow_downgrade`, `options`, `package_name`, `source`, `timeout`, and `version`
27+
- "`allow_downgrade`, `environment`, `options`, `package_name`, `source`, `timeout`, and `version`
2728
are the properties available to this resource."
2829
actions_list:
2930
:nothing:
@@ -42,6 +43,14 @@ properties_list:
4243
default_value: 'true'
4344
description_list:
4445
- markdown: Allow downgrading a package to satisfy requested version requirements.
46+
- property: environment
47+
ruby_type: Hash
48+
required: false
49+
default_value: "{}"
50+
new_in: '18.8'
51+
description_list:
52+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
53+
to be set before running the command.
4554
- property: options
4655
ruby_type: String, Array
4756
required: false

data/infra/resources/yum_package.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ syntax_full_code_block: |-
2020
yum_package 'name' do
2121
allow_downgrade true, false # default value: true
2222
arch String, Array
23+
environment Hash # default value: {}
2324
flush_cache Hash # default value: {"before"=>false, "after"=>false}
2425
options String, Array
2526
package_name String, Array
@@ -35,7 +36,7 @@ syntax_full_properties_list:
3536
- "`name` is the name given to the resource block."
3637
- "`action` identifies which steps Chef Infra Client will take to bring the node into
3738
the desired state."
38-
- "`allow_downgrade`, `arch`, `flush_cache`, `options`, `package_name`, `source`,
39+
- "`allow_downgrade`, `arch`, `environment`, `flush_cache`, `options`, `package_name`, `source`,
3940
`timeout`, `version`, and `yum_binary` are the properties available to this resource."
4041
actions_list:
4142
:install:
@@ -68,6 +69,14 @@ properties_list:
6869
description_list:
6970
- markdown: The architecture of the package to be installed or upgraded. This value
7071
can also be passed as part of the package name.
72+
- property: environment
73+
ruby_type: Hash
74+
required: false
75+
default_value: "{}"
76+
new_in: '18.8'
77+
description_list:
78+
- markdown: A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'}
79+
to be set before running the command.
7180
- property: flush_cache
7281
ruby_type: Hash
7382
required: false

0 commit comments

Comments
 (0)