kitchen-puppet 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -1
- data/kitchen-puppet.gemspec +2 -2
- data/lib/kitchen-puppet/version.rb +1 -1
- data/lib/kitchen/provisioner/puppet_agent.rb +1 -1
- data/lib/kitchen/provisioner/puppet_apply.rb +4 -2
- data/provisioner_options.md +18 -19
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a470760d6bcccb5f146c2a0d24d06467ad526144
|
4
|
+
data.tar.gz: 1b57a1ca243cd8706a992ec3c513ca7407f6a640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bef6ae28d59b2d6921ab36718d629f82b00e11dfc9793372f0eb7003446733289626f9f12a0382138a91abf1f447edb16727da34208960809f8ec8a87d8675fe
|
7
|
+
data.tar.gz: 91275834a49dfe7777faabd17b6ed0c5894baec9ead78b0e169db2fb2f437f022e03b286143416a285f3fbecf33cd522ddfacb552f880186c5e4f1cf43e800fd
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ This provider has been tested against the Ubuntu 1204 and Centos 6.5 boxes runni
|
|
30
30
|
|
31
31
|
2. From a Command prompt:
|
32
32
|
* gem install librarian-puppet
|
33
|
-
* gem install test-kitchen
|
33
|
+
* gem install test-kitchen (or gem install test-kitchen -v 1.16.0 if using ruby version less than 2.3)
|
34
34
|
* gem install kitchen-puppet
|
35
35
|
|
36
36
|
## Requirements
|
@@ -54,6 +54,45 @@ Sample Puppet Repositories
|
|
54
54
|
* A sample hello world example puppet repository for vagrant: https://github.com/neillturner/puppet_vagrant_windows_repo
|
55
55
|
* A more extensive sample installing virtualbox on windows: https://github.com/red-gate/puppet-virtualbox_windows
|
56
56
|
|
57
|
+
## Using Environments
|
58
|
+
|
59
|
+
In the root directory for your puppet repository:
|
60
|
+
|
61
|
+
Create a `.kitchen.yml`, much like one the described above:
|
62
|
+
|
63
|
+
```yaml
|
64
|
+
---
|
65
|
+
driver:
|
66
|
+
name: vagrant
|
67
|
+
|
68
|
+
provisioner:
|
69
|
+
name: puppet_apply
|
70
|
+
puppet_environment: dev
|
71
|
+
# the puppet environmnt files can be in this repository
|
72
|
+
puppet_environment_config_path: environment/dev/environment.conf
|
73
|
+
manifests_path: environment/dev/manifests
|
74
|
+
modules_path: environment/dev/modules_mycompany
|
75
|
+
# or external to this repository as long as they are accessible
|
76
|
+
# puppet_environment_config_path: /my_environments/dev/environment.conf
|
77
|
+
# manifests_path: /my_environments/dev/manifests
|
78
|
+
# modules_path: /my_environments/dev/modules_mycompany
|
79
|
+
hiera_data_path: /repository/puppet_repo/hieradata
|
80
|
+
|
81
|
+
platforms:
|
82
|
+
- name: nocm_ubuntu-12.04
|
83
|
+
driver_plugin: vagrant
|
84
|
+
driver_config:
|
85
|
+
box: nocm_ubuntu-12.04
|
86
|
+
box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
|
87
|
+
|
88
|
+
suites:
|
89
|
+
- name: default
|
90
|
+
```
|
91
|
+
|
92
|
+
Sample Puppet Repositories
|
93
|
+
* A sample hello world example puppet repository without environents : https://github.com/neillturner/puppet_vagrant_repo
|
94
|
+
* A sample hello world example puppet repository with environents : https://github.com/neillturner/puppet_vagrant_environment_repo
|
95
|
+
|
57
96
|
## Test-Kitchen Serverspec
|
58
97
|
|
59
98
|
To run the verify step with the test-kitchen serverspec setup your puppet repository as follows:
|
data/kitchen-puppet.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.required_ruby_version = '>= 2.0'
|
20
20
|
s.add_dependency 'test-kitchen', '~> 1.4'
|
21
21
|
s.add_dependency 'net-ssh', '>= 3'
|
22
|
-
s.description = <<-
|
22
|
+
s.description = <<-TEXT
|
23
23
|
== DESCRIPTION:
|
24
24
|
|
25
25
|
Puppet Provisioner for Test Kitchen
|
@@ -28,5 +28,5 @@ Gem::Specification.new do |s|
|
|
28
28
|
|
29
29
|
Supports puppet apply, puppet agent, hiera, hiera-eyaml, hiera-eyaml-gpg, custom facts, librarian-puppet, puppet collections (v4)
|
30
30
|
|
31
|
-
|
31
|
+
TEXT
|
32
32
|
end
|
@@ -316,7 +316,7 @@ module Kitchen
|
|
316
316
|
end
|
317
317
|
|
318
318
|
def puppet_masterport_flag
|
319
|
-
config[:puppet_masterport] ?
|
319
|
+
config[:puppet_masterport] ? "--masterport=#{config[:puppet_masterport]}" : nil
|
320
320
|
end
|
321
321
|
|
322
322
|
def puppet_detailed_exitcodes_flag
|
@@ -248,7 +248,7 @@ module Kitchen
|
|
248
248
|
if(Get-Command puppet -ErrorAction 0) { return; }
|
249
249
|
$architecture = if( [Environment]::Is64BitOperatingSystem ) { '-x64' } else { '' }
|
250
250
|
if( '#{puppet_windows_version}' -eq 'latest' ) {
|
251
|
-
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet
|
251
|
+
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-agent-${architecture}-latest.msi"
|
252
252
|
} elseif( '#{puppet_windows_version}' -like '5.*' ) {
|
253
253
|
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet5/puppet-agent-#{puppet_windows_version}-${architecture}.msi"
|
254
254
|
} else {
|
@@ -950,7 +950,7 @@ module Kitchen
|
|
950
950
|
end
|
951
951
|
|
952
952
|
def puppet_windows_version
|
953
|
-
config[:puppet_version] ? config[:puppet_version].to_s : '
|
953
|
+
config[:puppet_version] ? config[:puppet_version].to_s : 'latest'
|
954
954
|
end
|
955
955
|
|
956
956
|
def puppet_environment_flag
|
@@ -1295,6 +1295,7 @@ module Kitchen
|
|
1295
1295
|
end
|
1296
1296
|
end
|
1297
1297
|
|
1298
|
+
# rubocop:disable Lint/RescueWithoutErrorClass
|
1298
1299
|
def read_self_module_name
|
1299
1300
|
if File.exist?(modulefile)
|
1300
1301
|
warn('Modulefile found but this is deprecated, ignoring it, see https://tickets.puppetlabs.com/browse/PUP-1188')
|
@@ -1310,6 +1311,7 @@ module Kitchen
|
|
1310
1311
|
|
1311
1312
|
module_name
|
1312
1313
|
end
|
1314
|
+
# rubocop:enable Lint/RescueWithoutErrorClass
|
1313
1315
|
|
1314
1316
|
def prepare_puppet_config
|
1315
1317
|
return unless puppet_config
|
data/provisioner_options.md
CHANGED
@@ -27,7 +27,7 @@ It installs it in the following order:
|
|
27
27
|
|
28
28
|
key | default value | Notes
|
29
29
|
----|---------------|--------
|
30
|
-
chef_bootstrap_url |
|
30
|
+
chef_bootstrap_url | https://www.getchef.com/ chef/install.sh | the chef (needed for busser to run tests) NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
|
31
31
|
custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
|
32
32
|
custom_options | | custom options to add to puppet apply command.
|
33
33
|
custom_pre_install_command | nil | Custom shell command to be used at beginning of install stage. Can be multiline.
|
@@ -66,14 +66,14 @@ modules_path | | puppet repo manifests directory. Can be multiple directories se
|
|
66
66
|
no_proxy | nil | list of URLs or IPs that should be excluded from proxying
|
67
67
|
platform | platform_name kitchen.yml parameter | OS platform of server
|
68
68
|
puppet_apply_command | nil | Overwrite the puppet apply command. Needs "sudo -E puppet apply" as a prefix.
|
69
|
-
puppet_apt_repo |
|
70
|
-
_for Ubuntu14 change to_ |
|
71
|
-
_for Ubuntu15 change to_ |
|
72
|
-
_for Ubuntu16.04 change to_ |
|
73
|
-
puppet_apt_collections_repo |
|
74
|
-
_for Ubuntu14 change to_ |
|
75
|
-
_for Ubuntu15 change to_ |
|
76
|
-
_for Ubuntu16.04 change to_ |
|
69
|
+
puppet_apt_repo | http://apt.puppetlabs.com/ puppetlabs-release-precise.deb | apt repo Ubuntu12 see https://apt.puppetlabs.com for others
|
70
|
+
_for Ubuntu14 change to_ | http://apt.puppetlabs.com/ puppetlabs-release-trusty.deb |
|
71
|
+
_for Ubuntu15 change to_ | http://apt.puppetlabs.com/ puppetlabs-release-jessie.deb |
|
72
|
+
_for Ubuntu16.04 change to_ | http://apt.puppetlabs.com/ puppetlabs-release-xenial.deb |
|
73
|
+
puppet_apt_collections_repo | http://apt.puppetlabs.com/ puppet5-release-wheezy.deb | apt collections repo
|
74
|
+
_for Ubuntu14 change to_ | http://apt.puppetlabs.com/ puppet5-release-trusty.deb |
|
75
|
+
_for Ubuntu15 change to_ | http://apt.puppetlabs.com/ puppet5-release-jessie.deb |
|
76
|
+
_for Ubuntu16.04 change to_ | http://apt.puppetlabs.com/ puppet5-release-xenial.deb |
|
77
77
|
puppet_coll_remote_path | "/opt/puppetlabs" | Server Installation location of a puppet collections install.
|
78
78
|
puppet_config_path | | path of custom puppet.conf file
|
79
79
|
puppet_debug| false| Enable full debugging logging on puppet run
|
@@ -85,8 +85,8 @@ puppet_environment _hiera_config_path | "hiera.yaml" | Environment layer hiera c
|
|
85
85
|
puppet_environment _remote_hieradata_path | "hieradata" | Path in `puppet_environmentpath_remote_path` to contains the hiera data.
|
86
86
|
puppet_environment _remote_modules_path | "modules" | Path in `puppet_environmentpath_remote_path` to contains the modules.
|
87
87
|
puppet_environment _remote_manifests_path | "manifests" | Path in `puppet_environmentpath_remote_path` to contains the manifests.
|
88
|
-
puppet _environmentpath_remote_path |
|
89
|
-
puppet_future_parser | false | Run puppet with the future parser enabled (see https://docs.puppet.com/puppet/3.8/experiments_future.html).
|
88
|
+
puppet _environmentpath_remote_path | /etc/puppet/environments (v3), /etc/puppetlabs/code/environments (v4) | The remote path for environments if `puppet_environment` is true
|
89
|
+
puppet_future_parser | false | Run puppet with the future parser enabled (see https://docs.puppet.com/ puppet/3.8/experiments_future.html).
|
90
90
|
puppet_git_init | nil | initialize puppet from GIT repository, e.g. "git@github.com:example/puppet-repo.git"
|
91
91
|
puppet_git_pr | nil | checkout specific Pull Request from repository specified in puppet_git_init, e.g. "324"
|
92
92
|
puppet_logdest | nil | _Array_ of log destinations. Include 'console' if wanted
|
@@ -97,13 +97,12 @@ puppet_noop| false| puppet runs in a no-op or dry-run mode
|
|
97
97
|
puppet_no_sudo | false | allow puppet command to run without sudo if required
|
98
98
|
puppet_verbose| false| Extra information logging on puppet run
|
99
99
|
puppet_show_diff| false| Show diffs for changes to config files during puppet runs.
|
100
|
-
puppet_version | "latest"| desired version, affects apt installs.
|
101
|
-
_for windows defaults to_ | 5.0.0 |
|
100
|
+
puppet_version | "latest"| desired version, affects apt and most installs.
|
102
101
|
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)).
|
103
|
-
puppet_yum_repo |
|
104
|
-
_for RH/Centos7 change to_ |
|
105
|
-
puppet_yum_collections_repo |
|
106
|
-
_for RH/Centos7 change to_ |
|
102
|
+
puppet_yum_repo | https://yum.puppetlabs.com/ puppetlabs-release-el-6.noarch.rpm | yum repo RH/Centos6
|
103
|
+
_for RH/Centos7 change to_ | https://yum.puppetlabs.com/ puppetlabs-release-el-7.noarch.rpm |
|
104
|
+
puppet_yum_collections_repo | http://yum.puppetlabs.com/ puppet5/puppet-release-el-6.noarch.rpm | yum collections repo RH/Centos6
|
105
|
+
_for RH/Centos7 change to_ | http://yum.puppetlabs.com/ puppet5/puppet-release-el-7.noarch.rpm |
|
107
106
|
puppetfile_path | | Path to Puppetfile
|
108
107
|
remove_puppet_repo | false | remove copy of puppet repository and puppet configuration on server after running puppet
|
109
108
|
require_chef_for_busser | true | Install chef as currently needed by busser to run tests
|
@@ -211,8 +210,8 @@ puppet_version | "latest"| desired version, affects apt installs.
|
|
211
210
|
facter_version | "latest"| desired version, affects apt installs.
|
212
211
|
platform | platform_name kitchen.yml parameter | OS platform of server
|
213
212
|
require_puppet_repo | true | Set if using a puppet install from yum or apt repo
|
214
|
-
puppet_apt_repo |
|
215
|
-
puppet_yum_repo |
|
213
|
+
puppet_apt_repo | http://apt.puppetlabs.com/ puppetlabs-release-precise.deb| apt repo
|
214
|
+
puppet_yum_repo | https://yum.puppetlabs.com/ puppetlabs-release-el-6.noarch.rpm| yum repo
|
216
215
|
require_puppet_omnibus | false | Set if using omnibus puppet install
|
217
216
|
puppet_omnibus_url | | omnibus puppet install location.
|
218
217
|
puppet_omnibus_remote_path | "/opt/puppet" | Server Installation location of an omnibus puppet install.
|
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.1.
|
4
|
+
version: 3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neill Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project: "[none]"
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.6.13
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: puppet provisioner for test-kitchen
|