kitchen-puppet 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/kitchen-puppet.gemspec +1 -1
- data/lib/kitchen-puppet/version.rb +1 -1
- data/lib/kitchen/provisioner/puppet_agent.rb +3 -2
- data/lib/kitchen/provisioner/puppet_apply.rb +9 -4
- data/lib/kitchen/provisioner/puppet_bolt.rb +7 -4
- data/provisioner_options.md +2 -2
- 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: 0542ac99d127e21a163136f2b52b95f0e2d84335
|
4
|
+
data.tar.gz: ad2486099b5fe869218c222d9196e7d89c821cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e36d7314cccffb36e8a6c1a41e411326b6c59d45100745976164b16f93f519efdcf2dc31a572ae386f75147cf1ea0b4339ded5d71687eabacff880b49cee70b0
|
7
|
+
data.tar.gz: 6ca7dc799071b0d9155d1eb55a2a63e13cc3a58111c2b5e14c063e1200a2b88cb2324a0051669a3023d761636e622dc27225da59b57c3f98d7972a71e5cc61f0
|
data/README.md
CHANGED
@@ -19,6 +19,12 @@ The PuppetBolt provider works by passing the puppet bolt commands based on attri
|
|
19
19
|
|
20
20
|
This provider has been tested against the Ubuntu 1604 and Centos 7 boxes running in docker and vagrant/virtualbox.
|
21
21
|
|
22
|
+
## Template
|
23
|
+
|
24
|
+
Template project for using kitchen for puppet development:
|
25
|
+
|
26
|
+
https://github.com/scoopex/puppet-kitchen_template
|
27
|
+
|
22
28
|
## Resources
|
23
29
|
* http://ehaselwanter.com/en/blog/2014/05/08/using-test-kitchen-with-puppet
|
24
30
|
* http://www.slideshare.net/MartinEtmajer/testdriven-infrastructure-with-puppet-test-kitchen-serverspec-and-rspec
|
data/kitchen-puppet.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.platform = Gem::Platform::RUBY
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
s.rubyforge_project = '[none]'
|
19
|
-
s.required_ruby_version = '>= 2.
|
19
|
+
s.required_ruby_version = '>= 2.1'
|
20
20
|
s.add_dependency 'net-ssh', '>= 3'
|
21
21
|
s.add_dependency 'test-kitchen', '~> 1.4'
|
22
22
|
s.description = <<-TEXT
|
@@ -52,7 +52,7 @@ module Kitchen
|
|
52
52
|
|
53
53
|
default_config :puppet_apt_repo, 'http://apt.puppetlabs.com/puppetlabs-release-precise.deb'
|
54
54
|
default_config :puppet_yum_repo, 'https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm'
|
55
|
-
default_config :chef_bootstrap_url, 'https://www.
|
55
|
+
default_config :chef_bootstrap_url, 'https://www.chef.io/chef/install.sh'
|
56
56
|
|
57
57
|
default_config :puppet_agent_command, nil
|
58
58
|
|
@@ -79,7 +79,8 @@ module Kitchen
|
|
79
79
|
default_config :puppet_test, false
|
80
80
|
default_config :puppet_onetime, true
|
81
81
|
default_config :puppet_no_daemonize, true
|
82
|
-
|
82
|
+
# will default to 'puppet'
|
83
|
+
default_config :puppet_server, nil
|
83
84
|
default_config :puppet_waitforcert, '0'
|
84
85
|
default_config :puppet_certname, nil
|
85
86
|
default_config :puppet_digest, nil
|
@@ -71,7 +71,7 @@ module Kitchen
|
|
71
71
|
end
|
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
|
-
default_config :chef_bootstrap_url, 'https://www.
|
74
|
+
default_config :chef_bootstrap_url, 'https://www.chef.io/chef/install.sh'
|
75
75
|
default_config :puppet_logdest, nil
|
76
76
|
default_config :custom_install_command, nil
|
77
77
|
default_config :custom_pre_install_command, nil
|
@@ -711,6 +711,7 @@ module Kitchen
|
|
711
711
|
debug(command)
|
712
712
|
command
|
713
713
|
end
|
714
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
714
715
|
|
715
716
|
def run_command
|
716
717
|
return config[:puppet_apply_command] unless config[:puppet_apply_command].nil?
|
@@ -1036,6 +1037,7 @@ module Kitchen
|
|
1036
1037
|
config[:spec_files_remote_path]
|
1037
1038
|
end
|
1038
1039
|
|
1040
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
1039
1041
|
def facterlib
|
1040
1042
|
factpath = nil
|
1041
1043
|
factpath = File.join(config[:root_path], 'facter').to_s if config[:install_custom_facts] && config[:custom_facts].any?
|
@@ -1047,6 +1049,7 @@ module Kitchen
|
|
1047
1049
|
debug(bash_vars)
|
1048
1050
|
bash_vars
|
1049
1051
|
end
|
1052
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
1050
1053
|
|
1051
1054
|
def custom_facts
|
1052
1055
|
return nil if config[:custom_facts].none?
|
@@ -1088,6 +1091,7 @@ module Kitchen
|
|
1088
1091
|
end
|
1089
1092
|
end
|
1090
1093
|
|
1094
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
1091
1095
|
def puppet_apt_repo
|
1092
1096
|
platform_version = config[:platform].partition('-')[2]
|
1093
1097
|
case puppet_platform
|
@@ -1126,6 +1130,7 @@ module Kitchen
|
|
1126
1130
|
false
|
1127
1131
|
end
|
1128
1132
|
end
|
1133
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
1129
1134
|
|
1130
1135
|
def puppet_apt_repo_file
|
1131
1136
|
puppet_apt_repo.split('/').last if puppet_apt_repo
|
@@ -1248,6 +1253,7 @@ module Kitchen
|
|
1248
1253
|
end
|
1249
1254
|
end
|
1250
1255
|
|
1256
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
1251
1257
|
def prepare_modules
|
1252
1258
|
info('Preparing modules')
|
1253
1259
|
|
@@ -1279,6 +1285,7 @@ module Kitchen
|
|
1279
1285
|
copy_modules(modules_to_copy, tmpmodules_dir)
|
1280
1286
|
end
|
1281
1287
|
end
|
1288
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
1282
1289
|
|
1283
1290
|
def copy_modules(modules, destination)
|
1284
1291
|
excluded_paths = %w[modules pkg] + config[:ignored_paths_from_root]
|
@@ -1296,7 +1303,6 @@ module Kitchen
|
|
1296
1303
|
end
|
1297
1304
|
end
|
1298
1305
|
|
1299
|
-
# rubocop:disable Lint/RescueWithoutErrorClass
|
1300
1306
|
def read_self_module_name
|
1301
1307
|
if File.exist?(modulefile)
|
1302
1308
|
warn('Modulefile found but this is deprecated, ignoring it, see https://tickets.puppetlabs.com/browse/PUP-1188')
|
@@ -1306,13 +1312,12 @@ module Kitchen
|
|
1306
1312
|
module_name = nil
|
1307
1313
|
begin
|
1308
1314
|
module_name = JSON.parse(IO.read(metadata_json))['name'].split('-').last
|
1309
|
-
rescue
|
1315
|
+
rescue JSON::ParserError
|
1310
1316
|
error("not able to load or parse #{metadata_json} for the name of the module")
|
1311
1317
|
end
|
1312
1318
|
|
1313
1319
|
module_name
|
1314
1320
|
end
|
1315
|
-
# rubocop:enable Lint/RescueWithoutErrorClass
|
1316
1321
|
|
1317
1322
|
def prepare_puppet_config
|
1318
1323
|
return unless puppet_config
|
@@ -51,11 +51,14 @@ module Kitchen
|
|
51
51
|
default_config :https_proxy, nil
|
52
52
|
default_config :no_proxy, nil
|
53
53
|
# for future use
|
54
|
-
|
55
|
-
default_config :
|
56
|
-
default_config :
|
54
|
+
# bolt command run <COMMAND>, bolt script run, bolt task run, bolt plan run, bolt file upload
|
55
|
+
default_config :bolt_cmd, nil
|
56
|
+
default_config :bolt_nodes, nil
|
57
|
+
# BOLT_USER env variable
|
58
|
+
default_config :bolt_user, nil
|
57
59
|
default_config :bolt_password, nil
|
58
|
-
|
60
|
+
# Required for tasks and plans. The path to the module containing the task. Separate multiple paths with a semicolon (;) on Windows or a colon (:) on all other platforms.
|
61
|
+
default_config :bolt_modulepath, []
|
59
62
|
default_config :bolt_params, nil
|
60
63
|
default_config :bolt_tty, false
|
61
64
|
default_config :bolt_insecure, true
|
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 | https://www.
|
30
|
+
chef_bootstrap_url | https://www.chef.io/ 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.
|
@@ -232,7 +232,7 @@ puppet_noop| false| puppet runs in a no-op or dry-run mode
|
|
232
232
|
update_package_repos| true| update OS repository metadata
|
233
233
|
custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
|
234
234
|
facterlib | nil | Path for dynamic fact generation, e.g. /etc/puppet/facter . See https://docs.puppetlabs.com/facter/2.2/custom_facts.html
|
235
|
-
chef_bootstrap_url |"https://www.
|
235
|
+
chef_bootstrap_url |"https://www.chef.io/chef/install.sh"| the chef (needed for busser to run tests)
|
236
236
|
puppet_agent_command | nil | Overwrite the puppet agent command. Needs "sudo -E puppet agent" as a prefix.
|
237
237
|
require_chef_for_busser | true | Install chef as currently needed by busser to run tests. NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
|
238
238
|
puppet_config_path | | path of custom puppet.conf file
|
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.3.
|
4
|
+
version: 3.3.2
|
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: 2018-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '2.
|
76
|
+
version: '2.1'
|
77
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - ">="
|