beaker-puppet_install_helper 0.1.0 → 0.1.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 +8 -8
- data/.travis.yml +7 -0
- data/beaker-puppet_install_helper.gemspec +1 -1
- data/lib/beaker/puppet_install_helper.rb +12 -2
- data/spec/unit/beaker/puppet_install_helper_spec.rb +26 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGMwYzBjYWE3ZWY0Zjk4MDBmODMzMzNjZDJlZmVhZmZiOTEwNTJkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGVmMzlkMWRjNzdhOTUxMDlhMmYxY2ExZTM1NDhjNzlhY2QyYmI0MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2U4N2IzMDk4NDU2NTAxMmE5NDY0YTZhYjJhZDhhMTcyNTUzYjg5M2E4NTVk
|
10
|
+
YTRjNjM5MDY0NDEwZTI4ODNhYmU4ZTA1ZGI4ZjNlY2NhY2Q0MGM5ZjA0NDM0
|
11
|
+
ZjE2MjA0NTNkZjYwNTFiYzMyMWE3MmExNzAxOTM3ZGQ4ZGVmY2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWEyYjYwNWE4M2VmYzgwY2JjOTI2ZDEzNTg2NmI5NTNmYTRmZmYwYjMyZDkz
|
14
|
+
NDZiYmYxOTUxMDJjNjcyOTM0MzMwNjFiNGU0YjBiODc2NGI1OTU4Nzg3NDUx
|
15
|
+
ZDNhNTZjN2MwMDNhNWFlZGY0N2RiMGJjODk0ZWRmZDk1NzljZGY=
|
data/.travis.yml
ADDED
@@ -27,13 +27,21 @@ module Beaker::PuppetInstallHelper
|
|
27
27
|
when "pe"
|
28
28
|
# This will skip hosts that are not supported
|
29
29
|
install_pe_on(hosts,{"pe_ver" => version})
|
30
|
+
add_pe_defaults_on(hosts)
|
31
|
+
add_puppet_paths_on(hosts)
|
30
32
|
when "foss"
|
31
|
-
|
33
|
+
opts = {
|
32
34
|
:version => version,
|
33
35
|
:default_action => "gem_install",
|
34
36
|
}
|
35
37
|
|
36
|
-
install_puppet_on(hosts,
|
38
|
+
install_puppet_on(hosts, opts)
|
39
|
+
if opts[:version] and not version_is_less(opts[:version], '4.0.0')
|
40
|
+
add_aio_defaults_on(hosts)
|
41
|
+
else
|
42
|
+
add_foss_defaults_on(hosts)
|
43
|
+
end
|
44
|
+
add_puppet_paths_on(hosts)
|
37
45
|
Array(hosts).each do |host|
|
38
46
|
if fact_on(host,"osfamily") != "windows"
|
39
47
|
on host, "mkdir -p #{host["distmoduledir"]}"
|
@@ -49,6 +57,8 @@ module Beaker::PuppetInstallHelper
|
|
49
57
|
when "agent"
|
50
58
|
# This will fail on hosts that are not supported; use foss and specify a 4.x version instead
|
51
59
|
install_puppet_agent_on(hosts, {:version => version})
|
60
|
+
add_aio_defaults_on(hosts)
|
61
|
+
add_puppet_paths_on(hosts)
|
52
62
|
else
|
53
63
|
raise ArgumentError, "Type must be pe, foss, or agent; got #{type.inspect}"
|
54
64
|
end
|
@@ -18,8 +18,8 @@ describe 'beaker::puppet_install_helper' do
|
|
18
18
|
end
|
19
19
|
describe '#run_puppet_install_helper' do
|
20
20
|
before :each do
|
21
|
-
|
22
|
-
|
21
|
+
allow(subject).to receive(:default).and_return(double(:is_pe? => false))
|
22
|
+
allow(subject).to receive(:hosts).and_return(hosts)
|
23
23
|
end
|
24
24
|
it 'calls run_puppet_install_helper_on on each host' do
|
25
25
|
expect(subject).to receive(:run_puppet_install_helper_on).with(hosts,"foss",nil)
|
@@ -36,11 +36,15 @@ describe 'beaker::puppet_install_helper' do
|
|
36
36
|
it "uses foss by default for non-pe nodes" do
|
37
37
|
expect(subject).to receive(:default).and_return(double(:is_pe? => false))
|
38
38
|
expect(subject).to receive(:install_puppet_on).with(hosts,{:version => nil,:default_action => "gem_install"})
|
39
|
+
expect(subject).to receive(:add_foss_defaults_on).with(hosts)
|
40
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
39
41
|
subject.run_puppet_install_helper_on(hosts)
|
40
42
|
end
|
41
43
|
it "uses PE by default for PE nodes" do
|
42
44
|
expect(subject).to receive(:default).and_return(double(:is_pe? => true))
|
43
45
|
expect(subject).to receive(:install_pe_on).with(hosts,{"pe_ver" => nil})
|
46
|
+
expect(subject).to receive(:add_pe_defaults_on).with(hosts)
|
47
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
44
48
|
subject.run_puppet_install_helper_on(hosts)
|
45
49
|
end
|
46
50
|
end
|
@@ -48,12 +52,24 @@ describe 'beaker::puppet_install_helper' do
|
|
48
52
|
it "uses foss explicitly" do
|
49
53
|
ENV["PUPPET_INSTALL_TYPE"] = "foss"
|
50
54
|
expect(subject).to receive(:install_puppet_on).with(hosts,{:version => nil,:default_action => "gem_install"})
|
55
|
+
expect(subject).to receive(:add_foss_defaults_on).with(hosts)
|
56
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
51
57
|
subject.run_puppet_install_helper_on(hosts)
|
52
58
|
end
|
53
59
|
it "uses foss with a version" do
|
54
60
|
ENV["PUPPET_INSTALL_TYPE"] = "foss"
|
55
61
|
ENV["PUPPET_VERSION"] = "3.8.1"
|
56
62
|
expect(subject).to receive(:install_puppet_on).with(hosts,{:version => "3.8.1",:default_action => "gem_install"})
|
63
|
+
expect(subject).to receive(:add_foss_defaults_on).with(hosts)
|
64
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
65
|
+
subject.run_puppet_install_helper_on(hosts)
|
66
|
+
end
|
67
|
+
it "uses foss with a >4 version detects AIO" do
|
68
|
+
ENV["PUPPET_INSTALL_TYPE"] = "foss"
|
69
|
+
ENV["PUPPET_VERSION"] = "4.1.0"
|
70
|
+
expect(subject).to receive(:install_puppet_on).with(hosts,{:version => "4.1.0",:default_action => "gem_install"})
|
71
|
+
expect(subject).to receive(:add_aio_defaults_on).with(hosts)
|
72
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
57
73
|
subject.run_puppet_install_helper_on(hosts)
|
58
74
|
end
|
59
75
|
end
|
@@ -61,12 +77,16 @@ describe 'beaker::puppet_install_helper' do
|
|
61
77
|
it "uses PE explicitly" do
|
62
78
|
ENV["PUPPET_INSTALL_TYPE"] = "pe"
|
63
79
|
expect(subject).to receive(:install_pe_on).with(hosts,{"pe_ver" => nil})
|
80
|
+
expect(subject).to receive(:add_pe_defaults_on).with(hosts)
|
81
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
64
82
|
subject.run_puppet_install_helper_on(hosts)
|
65
83
|
end
|
66
84
|
it "uses PE with a version" do
|
67
85
|
ENV["PUPPET_INSTALL_TYPE"] = "pe"
|
68
86
|
ENV["PUPPET_VERSION"] = "3.8.1"
|
69
87
|
expect(subject).to receive(:install_pe_on).with(hosts,{"pe_ver" => "3.8.1"})
|
88
|
+
expect(subject).to receive(:add_pe_defaults_on).with(hosts)
|
89
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
70
90
|
subject.run_puppet_install_helper_on(hosts)
|
71
91
|
end
|
72
92
|
end
|
@@ -74,12 +94,16 @@ describe 'beaker::puppet_install_helper' do
|
|
74
94
|
it "uses agent explicitly" do
|
75
95
|
ENV["PUPPET_INSTALL_TYPE"] = "agent"
|
76
96
|
expect(subject).to receive(:install_puppet_agent_on).with(hosts,{:version => nil})
|
97
|
+
expect(subject).to receive(:add_aio_defaults_on).with(hosts)
|
98
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
77
99
|
subject.run_puppet_install_helper_on(hosts)
|
78
100
|
end
|
79
101
|
it "uses foss with a version" do
|
80
102
|
ENV["PUPPET_INSTALL_TYPE"] = "agent"
|
81
103
|
ENV["PUPPET_VERSION"] = "1.1.0"
|
82
104
|
expect(subject).to receive(:install_puppet_agent_on).with(hosts,{:version => "1.1.0"})
|
105
|
+
expect(subject).to receive(:add_aio_defaults_on).with(hosts)
|
106
|
+
expect(subject).to receive(:add_puppet_paths_on).with(hosts)
|
83
107
|
subject.run_puppet_install_helper_on(hosts)
|
84
108
|
end
|
85
109
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-puppet_install_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -46,6 +46,7 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- .gitignore
|
49
|
+
- .travis.yml
|
49
50
|
- Gemfile
|
50
51
|
- beaker-puppet_install_helper.gemspec
|
51
52
|
- lib/beaker/puppet_install_helper.rb
|