kitchen-puppet 3.5.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kitchen/provisioner/puppet/r10k.rb +1 -1
- data/lib/kitchen/provisioner/puppet_apply.rb +54 -16
- data/lib/kitchen-puppet/version.rb +1 -1
- data/provisioner_options.md +6 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 369f3fad210da9729f01a2955b6adb88422d3b862afb7492f8dad79cbf9b3004
|
4
|
+
data.tar.gz: 94262474ab75182dddb52e5f5ae6d7e956b3bd0f8e4159fec38ff718c9b2dd75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3eceb0feb4f505ca30193014eb1eb3dbf51dd1d4d54da3b0f544c830731c1f34c6cc93cab493a0b4f6dab91ed58df8a25a7de70d4bd16e6ade7e646f102c563e
|
7
|
+
data.tar.gz: eea4d4dc9fee471146f868a062994d98f676873bb7008e9679580f37281426273fe31c5cb3e665fe409dc4815a533cc6c603df0a737c4a9aa805b6c757d5c625
|
@@ -47,7 +47,7 @@ module Kitchen
|
|
47
47
|
::R10K::Git::Cache.settings[:cache_root] = '.r10k/git'
|
48
48
|
::R10K::Forge::ModuleRelease.settings[:cache_root] = '.r10k/cache'
|
49
49
|
|
50
|
-
pf = ::R10K::Puppetfile.new(
|
50
|
+
pf = ::R10K::Puppetfile.new("", path, puppetfile)
|
51
51
|
pf.load
|
52
52
|
pf.modules.map(&:sync)
|
53
53
|
end
|
@@ -72,6 +72,7 @@ module Kitchen
|
|
72
72
|
default_config :puppet_apt_repo, 'http://apt.puppetlabs.com/puppetlabs-release-precise.deb'
|
73
73
|
default_config :puppet_yum_repo, 'https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm'
|
74
74
|
default_config :chef_bootstrap_url, 'https://www.chef.io/chef/install.sh'
|
75
|
+
default_config :puppet_windows_msi_url, nil
|
75
76
|
default_config :puppet_logdest, nil
|
76
77
|
default_config :custom_install_command, nil
|
77
78
|
default_config :custom_pre_install_command, nil
|
@@ -215,6 +216,7 @@ module Kitchen
|
|
215
216
|
#{custom_pre_install_command}
|
216
217
|
if [ ! $(which puppet) ]; then
|
217
218
|
#{sudo('apt-get')} -y install wget
|
219
|
+
#{sudo('apt-get')} -y install apt-transport-https
|
218
220
|
#{sudo('wget')} #{wget_proxy_parm} #{puppet_apt_repo}
|
219
221
|
#{sudo('dpkg')} -i #{puppet_apt_repo_file}
|
220
222
|
#{update_packages_debian_cmd}
|
@@ -248,14 +250,21 @@ module Kitchen
|
|
248
250
|
info("Installing puppet on #{puppet_platform}")
|
249
251
|
info('Powershell is not recognised by core test-kitchen assuming it is present') unless powershell_shell?
|
250
252
|
<<-INSTALL
|
253
|
+
#{custom_pre_install_command}
|
251
254
|
if(Get-Command puppet -ErrorAction 0) { return; }
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
255
|
+
if( '#{puppet_windows_msi_url}' -ne '') {
|
256
|
+
$MsiUrl = '#{puppet_windows_msi_url}'
|
257
|
+
}
|
258
|
+
else
|
259
|
+
{
|
260
|
+
$architecture = if( [Environment]::Is64BitOperatingSystem ) { 'x64' } else { 'x86' }
|
261
|
+
if( '#{puppet_windows_version}' -eq 'latest' ) {
|
262
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-${architecture}-latest.msi"
|
263
|
+
} elseif( '#{puppet_windows_version}' -match '(\\d)\\.' ) {
|
264
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet$($Matches[1])/puppet-agent-#{puppet_windows_version}-${architecture}.msi"
|
265
|
+
} else {
|
266
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-#{puppet_windows_version}${architecture}.msi"
|
267
|
+
}
|
259
268
|
}
|
260
269
|
Invoke-WebRequest $MsiUrl -UseBasicParsing -OutFile "C:/puppet.msi" #{posh_proxy_parm}
|
261
270
|
$process = Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList '/qn', '/norestart', '/i', 'C:\\puppet.msi'
|
@@ -263,8 +272,8 @@ module Kitchen
|
|
263
272
|
Write-Host "Installer failed."
|
264
273
|
Exit 1
|
265
274
|
}
|
266
|
-
|
267
275
|
#{install_busser}
|
276
|
+
#{custom_install_command}
|
268
277
|
INSTALL
|
269
278
|
else
|
270
279
|
info('Installing puppet, will try to determine platform os')
|
@@ -280,6 +289,7 @@ module Kitchen
|
|
280
289
|
#{install_puppet_yum_repo}
|
281
290
|
else
|
282
291
|
#{sudo('apt-get')} -y install wget
|
292
|
+
#{sudo('apt-get')} -y install apt-transport-https
|
283
293
|
#{sudo('wget')} #{wget_proxy_parm} #{puppet_apt_repo}
|
284
294
|
#{sudo('dpkg')} -i #{puppet_apt_repo_file}
|
285
295
|
#{update_packages_debian_cmd}
|
@@ -312,6 +322,7 @@ module Kitchen
|
|
312
322
|
if [ ! -d "#{config[:puppet_coll_remote_path]}" ]; then
|
313
323
|
if [ ! -f "#{config[:puppet_apt_collections_repo]}" ]; then
|
314
324
|
#{sudo('apt-get')} -y install wget
|
325
|
+
#{sudo('apt-get')} -y install apt-transport-https
|
315
326
|
#{sudo('wget')} #{wget_proxy_parm} #{config[:puppet_apt_collections_repo]}
|
316
327
|
fi
|
317
328
|
#{sudo('dpkg')} -i #{puppet_apt_coll_repo_file}
|
@@ -346,14 +357,21 @@ module Kitchen
|
|
346
357
|
info("Installing Puppet Collections on #{puppet_platform}")
|
347
358
|
info('Powershell is not recognised by core test-kitchen assuming it is present') unless powershell_shell?
|
348
359
|
<<-INSTALL
|
360
|
+
#{custom_pre_install_command}
|
349
361
|
if(Get-Command puppet -ErrorAction 0) { return; }
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
362
|
+
if( '#{puppet_windows_msi_url}' -ne '') {
|
363
|
+
$MsiUrl = '#{puppet_windows_msi_url}'
|
364
|
+
}
|
365
|
+
else
|
366
|
+
{
|
367
|
+
$architecture = if( [Environment]::Is64BitOperatingSystem ) { 'x64' } else { 'x86' }
|
368
|
+
if( '#{puppet_windows_version}' -eq 'latest' ) {
|
369
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-${architecture}-latest.msi"
|
370
|
+
} elseif( '#{puppet_windows_version}' -match '(\\d)\\.' ) {
|
371
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet$($Matches[1])/puppet-agent-#{puppet_windows_version}-${architecture}.msi"
|
372
|
+
} else {
|
373
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-#{puppet_windows_version}-${architecture}.msi"
|
374
|
+
}
|
357
375
|
}
|
358
376
|
Invoke-WebRequest $MsiUrl -UseBasicParsing -OutFile "C:/puppet-agent.msi" #{posh_proxy_parm}
|
359
377
|
$process = Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList '/qn', '/norestart', '/i', 'C:\\puppet-agent.msi'
|
@@ -361,8 +379,8 @@ module Kitchen
|
|
361
379
|
Write-Host "Installer failed."
|
362
380
|
Exit 1
|
363
381
|
}
|
364
|
-
|
365
382
|
#{install_busser}
|
383
|
+
#{custom_install_command}
|
366
384
|
INSTALL
|
367
385
|
else
|
368
386
|
info('Installing Puppet Collections, will try to determine platform os')
|
@@ -378,6 +396,7 @@ module Kitchen
|
|
378
396
|
#{sudo_env('yum')} -y --nogpgcheck install puppet-agent#{puppet_redhat_version}
|
379
397
|
else
|
380
398
|
#{sudo('apt-get')} -y install wget
|
399
|
+
#{sudo('apt-get')} -y install apt-transport-https
|
381
400
|
#{sudo('wget')} #{wget_proxy_parm} #{config[:puppet_apt_collections_repo]}
|
382
401
|
#{sudo('dpkg')} -i #{puppet_apt_coll_repo_file}
|
383
402
|
#{sudo('apt-get')} update
|
@@ -969,6 +988,10 @@ module Kitchen
|
|
969
988
|
config[:puppet_version] ? config[:puppet_version].to_s : 'latest'
|
970
989
|
end
|
971
990
|
|
991
|
+
def puppet_windows_msi_url
|
992
|
+
config[:puppet_windows_msi_url]
|
993
|
+
end
|
994
|
+
|
972
995
|
def puppet_environment_flag
|
973
996
|
if config[:puppet_version] =~ /^2/
|
974
997
|
config[:puppet_environment] ? "--environment=#{puppet_environment}" : nil
|
@@ -1111,6 +1134,15 @@ module Kitchen
|
|
1111
1134
|
case puppet_platform
|
1112
1135
|
when 'ubuntu'
|
1113
1136
|
case platform_version
|
1137
|
+
when '20.04'
|
1138
|
+
# focal Repo
|
1139
|
+
'https://apt.puppetlabs.com/puppet-release-focal.deb'
|
1140
|
+
when '18.04'
|
1141
|
+
# bionic Repo
|
1142
|
+
'https://apt.puppetlabs.com/puppet-release-bionic.deb'
|
1143
|
+
when '16.04'
|
1144
|
+
# xenial Repo
|
1145
|
+
'https://apt.puppetlabs.com/puppet-release-xenial.deb'
|
1114
1146
|
when '14.10'
|
1115
1147
|
# Utopic Repo
|
1116
1148
|
'https://apt.puppetlabs.com/puppetlabs-release-utopic.deb'
|
@@ -1126,6 +1158,12 @@ module Kitchen
|
|
1126
1158
|
end
|
1127
1159
|
when 'debian'
|
1128
1160
|
case platform_version.gsub(/\..*/, '')
|
1161
|
+
when '10'
|
1162
|
+
# Debian buster
|
1163
|
+
'https://apt.puppetlabs.com/puppet-tools-release-buster.deb'
|
1164
|
+
when '9'
|
1165
|
+
# Debian xenial
|
1166
|
+
'https://apt.puppetlabs.com/puppet-tools-release-stretch.deb'
|
1129
1167
|
when '8'
|
1130
1168
|
# Debian Jessie
|
1131
1169
|
'https://apt.puppetlabs.com/puppetlabs-release-jessie.deb'
|
data/provisioner_options.md
CHANGED
@@ -102,6 +102,7 @@ puppet_verbose| false| Extra information logging on puppet run
|
|
102
102
|
puppet_show_diff| false| Show diffs for changes to config files during puppet runs.
|
103
103
|
puppet_version | "latest"| desired version, affects apt and most installs.
|
104
104
|
puppet_whitelist_exit_code | nil | Whitelist exit code expected from puppet run. Intended to be used together with `puppet_detailed_exitcodes`. You can also specify a yaml list here (you should use 0 and 2 for `puppet_detailed_exitcodes` to capture puppet runtime errors and allow multiple converge runs (without changes)).
|
105
|
+
puppet_windows_msi_url | nil | The MSI to use to install Puppet on Windows, optional but may be needed when you want the latest version of a particular major Puppet release.
|
105
106
|
puppet_yum_repo | https://yum.puppetlabs.com/ puppetlabs-release-el-6.noarch.rpm | yum repo RH/Centos6
|
106
107
|
_for RH/Centos7 change to_ | https://yum.puppetlabs.com/ puppetlabs-release-el-7.noarch.rpm |
|
107
108
|
puppet_yum_collections_repo | https://yum.puppetlabs.com/ puppet5/puppet-release-el-6.noarch.rpm | yum collections repo RH/Centos6
|
@@ -187,11 +188,11 @@ To override a setting at the suite-level, specify the setting name under the sui
|
|
187
188
|
|
188
189
|
It can be beneficial to keep different Puppet layouts for different suites. Rather than having to specify the manifest, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
|
189
190
|
|
190
|
-
$kitchen_root
|
191
|
-
$kitchen_root
|
192
|
-
$kitchen_root
|
193
|
-
$kitchen_root
|
194
|
-
$kitchen_root
|
191
|
+
$kitchen_root/$suite_name/puppet/manifests
|
192
|
+
$kitchen_root/$suite_name/puppet/modules
|
193
|
+
$kitchen_root/$suite_name/puppet/hiera
|
194
|
+
$kitchen_root/$suite_name/puppet/hiera.yaml
|
195
|
+
$kitchen_root/$suite_name/puppet/Puppetfile
|
195
196
|
|
196
197
|
### Puppet Version
|
197
198
|
When specifying a puppet version, you must use this format: "3.6.2-1puppetlabs1". I have
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neill Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.2.21
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: puppet provisioner for test-kitchen
|