kitchen-puppet 1.45.0 → 1.45.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc9867719f776ed274af4071a93f2e596f874741
4
- data.tar.gz: 46b3fec2a7f164ec354ff6787f47f66c4508b83d
3
+ metadata.gz: c5dc746ed2da8713a22e51d2617606ea867f4344
4
+ data.tar.gz: ad89bbde2f6781bfa45e6e87d0c7297f69f71f67
5
5
  SHA512:
6
- metadata.gz: 1263a1c2d9d8dd8d9ff5150efa040cf4db40080fd509e916473991c105ff82f9979fe15f278f002555f4d83dbf49e2ba064ed1f793df4b184e86fe662e0ec3e8
7
- data.tar.gz: f68fa758a2873c03ecec436ddb13e321531f3d34da14c2879da990170148f67ea7ebb85ffab02694d5701fe6050dbde47016192a6d26d953ed732f6bbfd9c89f
6
+ metadata.gz: e4908784a514c2cbac99d941ec6ba49d7f5453b06d7f2e0155143dec35ba1694e778890ccc7aef536986b942eee1224648af809dec1dc657bbafba633914337f
7
+ data.tar.gz: ca0b413cbcdb1ade56fdb433649fb6b9fe829eb3c75db9708610291dde5448e500497e923e6dee477d5f303885242e57690674fb47fb8a732706c7707032663e
data/README.md CHANGED
@@ -14,7 +14,14 @@ The PuppetApply provider works by passing the puppet repository based on attribu
14
14
  The PuppetAgent provider works by passing the puppetmaster and other attributes in .kitchen.yml & calling puppet agent.
15
15
 
16
16
 
17
- This provider has been tested against the Ubuntu 1204 and Centos 6.5 boxes running in vagrant/virtualbox as well as various docker .
17
+ This provider has been tested against the Ubuntu 1204 and Centos 6.5 boxes running in vagrant/virtualbox as well as various docker.
18
+
19
+ ## Resources
20
+ * http://ehaselwanter.com/en/blog/2014/05/08/using-test-kitchen-with-puppet
21
+ * http://www.slideshare.net/MartinEtmajer/testdriven-infrastructure-with-puppet-test-kitchen-serverspec-and-rspec
22
+ * http://www.slideshare.net/YuryTsarev/containercon-test-driven-infrastructure
23
+ * http://events.linuxfoundation.org/sites/events/files/slides/ContainerCon%20-%20Test%20Driven%20Infrastructure_0.pdf
24
+ * https://www.cedric-meury.ch/2016/10/test-driven-infrastructure-with-puppet-docker-test-kitchen-and-serverspec-yury-tsarev-gooddata
18
25
 
19
26
  ## Windows Workstation Install
20
27
  You need to download the puppet msi and install it and run everything inside the puppet window.
@@ -148,8 +155,10 @@ To implement this with test-kitchen setup the puppet repository with:
148
155
 
149
156
  * install kitchen-verifier-serverspec on your workstation i.e. 'gem install kitchen-verifier-serverspec'
150
157
 
158
+ See examples:
159
+ * [https://github.com/neillturner/puppet_vagrant_repo](https://github.com/neillturner/puppet_vagrant_repo)
151
160
 
152
- See example [https://github.com/neillturner/puppet_repo](https://github.com/neillturner/puppet_repo)
161
+ * [https://github.com/neillturner/puppet_repo](https://github.com/neillturner/puppet_repo)
153
162
 
154
163
  ```
155
164
  .
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kitchen
4
4
  module Puppet
5
- VERSION = '1.45.0'.freeze
5
+ VERSION = '1.45.1'.freeze
6
6
  end
7
7
  end
@@ -221,10 +221,11 @@ module Kitchen
221
221
  info("Installing puppet on #{puppet_platform}")
222
222
  <<-INSTALL
223
223
  if(Get-Command puppet -ErrorAction 0) { return; }
224
- if( [Environment]::Is64BitOperatingSystem ) {
225
- $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-#{puppet_windows_version}-x64.msi"
224
+ $architecture = if( [Environment]::Is64BitOperatingSystem ) { '-x64' } else { '' }
225
+ if( '#{puppet_windows_version}' -eq 'latest' ) {
226
+ $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet${architecture}-latest.msi"
226
227
  } else {
227
- $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-#{puppet_windows_version}.msi"
228
+ $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-#{puppet_windows_version}${architecture}.msi"
228
229
  }
229
230
  $process = Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList '/qn', '/norestart', '/i', $MsiUrl
230
231
  if ($process.ExitCode -ne 0) {
@@ -305,6 +306,24 @@ module Kitchen
305
306
  #{install_busser}
306
307
  #{custom_install_command}
307
308
  INSTALL
309
+ when /^windows.*/
310
+ info("Installing Puppet Collections on #{puppet_platform}")
311
+ <<-INSTALL
312
+ if(Get-Command puppet -ErrorAction 0) { return; }
313
+ $architecture = if( [Environment]::Is64BitOperatingSystem ) { 'x64' } else { 'x86' }
314
+ if( '#{puppet_windows_version}' -eq 'latest' ) {
315
+ $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-${architecture}-latest.msi"
316
+ } else {
317
+ $MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-#{puppet_windows_version}-${architecture}.msi"
318
+ }
319
+ $process = Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList '/qn', '/norestart', '/i', $MsiUrl
320
+ if ($process.ExitCode -ne 0) {
321
+ Write-Host "Installer failed."
322
+ Exit 1
323
+ }
324
+
325
+ #{install_busser}
326
+ INSTALL
308
327
  else
309
328
  info('Installing Puppet Collections, will try to determine platform os')
310
329
  <<-INSTALL
@@ -564,13 +583,7 @@ module Kitchen
564
583
  ].join(' ')
565
584
  end
566
585
 
567
- if hiera_data && hiera_data_remote_path == '/var/lib/hiera'
568
- commands << [
569
- sudo("#{cp_command} -r"), File.join(config[:root_path], 'hiera'), '/var/lib/'
570
- ].join(' ')
571
- end
572
-
573
- if hiera_data && hiera_data_remote_path != '/var/lib/hiera'
586
+ if hiera_data
574
587
  commands << [
575
588
  sudo(mkdir_command), hiera_data_remote_path
576
589
  ].join(' ')
@@ -746,10 +759,9 @@ module Kitchen
746
759
  end
747
760
 
748
761
  def puppet_cmd
749
- puppet_bin = powershell_shell? ? '& "C:\Program Files\Puppet Labs\Puppet\bin\puppet"' : 'puppet'
750
- if config[:require_puppet_collections]
751
- puppet_bin = "#{config[:puppet_coll_remote_path]}/bin/puppet"
752
- end
762
+ return '& "C:\Program Files\Puppet Labs\Puppet\bin\puppet"' if powershell_shell?
763
+
764
+ puppet_bin = config[:require_puppet_collections] ? "#{config[:puppet_coll_remote_path]}/bin/puppet" : 'puppet'
753
765
 
754
766
  if config[:puppet_no_sudo]
755
767
  puppet_bin
@@ -759,15 +771,13 @@ module Kitchen
759
771
  end
760
772
 
761
773
  def puppet_dir
762
- return '/etc/puppetlabs/puppet' if config[:require_puppet_collections]
763
- return '/etc/puppet' unless powershell_shell?
764
- 'C:/ProgramData/PuppetLabs/puppet/etc'
774
+ return 'C:/ProgramData/PuppetLabs/puppet/etc' if powershell_shell?
775
+ config[:require_puppet_collections] ? '/etc/puppetlabs/puppet' : '/etc/puppet'
765
776
  end
766
777
 
767
778
  def hiera_config_dir
768
- return '/etc/puppetlabs/code' if config[:require_puppet_collections]
769
- return '/etc/puppet' unless powershell_shell?
770
- 'C:/ProgramData/PuppetLabs/puppet/etc'
779
+ return 'C:/ProgramData/PuppetLabs/puppet/etc' if powershell_shell?
780
+ config[:require_puppet_collections] ? '/etc/puppetlabs/code' : '/etc/puppet'
771
781
  end
772
782
 
773
783
  def puppet_debian_version
@@ -791,7 +801,7 @@ module Kitchen
791
801
  end
792
802
 
793
803
  def puppet_windows_version
794
- config[:puppet_version] ? config[:puppet_version].to_s : '3.8.6'
804
+ config[:puppet_version] ? config[:puppet_version].to_s : 'latest'
795
805
  end
796
806
 
797
807
  def puppet_environment_flag
@@ -56,6 +56,7 @@ install_hiera | false | Installs `hiera-puppet` package. Not needed for puppet >
56
56
  librarian_puppet_ssl_file | nil | ssl certificate file for librarian-puppet
57
57
  manifest | 'site.pp' | manifest for puppet apply to run
58
58
  manifests_path | | puppet repo manifests directory
59
+ max_retries| 1 | maximum number of retry attempts of converge command
59
60
  modules_path | | puppet repo manifests directory. Can be multiple directories separated by colons and then they will be merged
60
61
  platform | platform_name kitchen.yml parameter | OS platform of server
61
62
  puppet_apply_command | nil | Overwrite the puppet apply command. Needs "sudo -E puppet apply" as a prefix.
@@ -90,7 +91,9 @@ require_puppet_collections | false | Set if using puppet collections install (Pu
90
91
  require_puppet_omnibus | false | Set if using omnibus puppet install
91
92
  require_puppet_repo | true | Set if using a puppet install from yum or apt repo
92
93
  resolve_with_librarian_puppet | true | Use librarian_puppet to resolve modules if a Puppetfile is found
94
+ retry_on_exit_code| [] | Array of exit codes to retry converge command against
93
95
  update_package_repos| true| update OS repository metadata
96
+ wait_for_retry| 30 | number of seconds to wait before retrying converge command
94
97
 
95
98
  ## Puppet Apply Configuring Provisioner Options
96
99
 
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: 1.45.0
4
+ version: 1.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-28 00:00:00.000000000 Z
11
+ date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen