beaker-puppet_install_helper 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjA3MTZjYjdiZThlMTFjNjJiMzBhOTlmY2ViZTM5MzAxOTg2NzAzMA==
4
+ YmQxZWM4ODRkZTcwMjQxMDYxZWFkODhjYjlmNTA4MmU3MGU0MTllNA==
5
5
  data.tar.gz: !binary |-
6
- MDU4MWNjYjMwNTM1MTliYjMwNjA4NGE4OGMzZjFkNDkxYTM2MDJmMA==
6
+ NjdkNWM2ZGQ5YzRiYzE0NTlmY2ExYmNlZDNmZjM4YmRkMmZhNzM1ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDhiYzZlYTlmYjBhZTgyNTk0ZmQyNTkwNDM2YzczMmIxZmRhODk5NGJmYzA3
10
- MzNmZDAyNzJiNmQ0MGFlOGVkZDcxODJlMjYzMWM1ZGEwMjk3YmE3Mzc5YmRk
11
- ODZhNzVlNGUzODlkY2E4ZTA2NjE0MDIxNTFiZDVkZTY5ZGQ5NTE=
9
+ NDNhY2MzZjQ1YWU3ODU4YjM5MTNjMjg5MGVjNDM0N2VhOTE2NmVkNzgwMjBi
10
+ ZDgzZWM2MjQ4MGIzNGRjNGFhMzQ1NWJhZGNlMDE0NTY3YzI3ZGQzNWU0ZTcy
11
+ MjcxZTc0OGQ2NzRmMzNjMTE3ODU4ZTBiMGM3ZTg5YTY2NzRhY2U=
12
12
  data.tar.gz: !binary |-
13
- Mzc5YWY3ZjdhNmJkZTY1MTIyMjE2ZWY2YjQ2MGQzNTI1MmQ2OTY0ZTdhNzhm
14
- MmNlNTVhYWI2NmY5ZDhhZWU3N2FkMjEzMDAwODE5OTQ3NjFjYTU5NDVjNzZi
15
- OTUzMGNiMjE1MzlkNDI1YWUyNTljY2FkNzZmZWJjMTQ3NjBiNjE=
13
+ ZTMzYmM1N2I2MjBkOGRmYWU1ZDkxZWI1Y2U3OTJmODA1NTZhMGI2ZGYwZjc0
14
+ ODI2YWFhMjBjNTE3MzI0OTE4YTc1NWQ3YmUxNDdhN2ViYTdjOTBlZGIxYjMw
15
+ ZGI3YTFmMmJiNTU1MGY2YjA0ZDU1MDk1OWQyMDE1OGExMGFlMGM=
data/README.md ADDED
@@ -0,0 +1,17 @@
1
+ ## beaker-puppet\_install\_helper
2
+
3
+ This gem is simply an abstraction for the various ways that we install puppet from the `spec/spec_helper_acceptance.rb` files across the modules.
4
+
5
+ The way to use this is to declare either `run_puppet_install_helper()` or `run_puppet_install_helper_on(hosts)` and set environment variables `PUPPET_VERSION` and/or `PUPPET_INSTALL_TYPE` in the following combinations to have puppet installed on the desired hosts:
6
+
7
+ - `PUPPET_INSTALL_TYPE` is unset: it will look at the default node's type (ie, `default.is_pe?` and choose either foss or pe methods below.
8
+ - `PUPPET_INSTALL_TYPE=pe` will read `PUPPET_VERSION` and attempt to install that version of the PE tarball. If no version is set, then it uses the latest stable build.
9
+ - `PUPPET_INSTALL_TYPE=foss` will read `PUPPET_VERSION` and:
10
+ - if `PUPPET_VERSION` is less than 4 will attempt to install that version of the system package if available, or else the ruby gem of that version.
11
+ - if `PUPPET_VERSION` is 4 or more it will attempt to install the corresponding puppet-agent package, or gem version otherwise.
12
+ - `PUPPET_INSTALL_TYPE=agent` will read `PUPPET_VERSION` and install that version of puppet-agent (eg, `PUPPET_INSTALL_TYPE=agent PUPPET_VERSION=1.0.0`)
13
+
14
+ The best way is explicitly set `PUPPET_INSTALL_TYPE` and `PUPPET_VERSION` to what you want. It'll probably do what you expect.
15
+
16
+ ### TODO
17
+ - Add support for ci-ready builds
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "beaker-puppet_install_helper"
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.authors = ["Puppetlabs"]
5
5
  s.email = ["hunter@puppetlabs.com"]
6
6
  s.homepage = "https://github.com/puppetlabs/beaker-puppet_install_helper"
@@ -26,12 +26,12 @@ module Beaker::PuppetInstallHelper
26
26
  case type
27
27
  when "pe"
28
28
  # This will skip hosts that are not supported
29
- install_pe_on(Array(hosts),{"pe_ver" => version})
29
+ install_pe_on(Array(hosts),options.merge({"pe_ver" => version}))
30
30
  when "foss"
31
- opts = {
31
+ opts = options.merge({
32
32
  :version => version,
33
33
  :default_action => "gem_install",
34
- }
34
+ })
35
35
 
36
36
  install_puppet_on(hosts, opts)
37
37
  # XXX install_puppet_on() will only add_aio_defaults_on when the nodeset
@@ -56,7 +56,7 @@ module Beaker::PuppetInstallHelper
56
56
  end
57
57
  when "agent"
58
58
  # This will fail on hosts that are not supported; use foss and specify a 4.x version instead
59
- install_puppet_agent_on(hosts, {:version => version})
59
+ install_puppet_agent_on(hosts,options.merge({:version => version}))
60
60
  # XXX install_puppet_agent_on() will only add_aio_defaults_on when the
61
61
  # nodeset type == 'aio', but we don't want to depend on that.
62
62
  add_aio_defaults_on(hosts)
@@ -14,6 +14,7 @@ describe 'beaker::puppet_install_helper' do
14
14
  [foss_host, pe_host]
15
15
  end
16
16
  before :each do
17
+ allow(subject).to receive(:options).and_return({})
17
18
  allow(subject).to receive(:on)
18
19
  allow(subject).to receive(:fact_on)
19
20
  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.2
4
+ version: 0.1.3
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 00:00:00.000000000 Z
11
+ date: 2015-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -48,6 +48,7 @@ files:
48
48
  - .gitignore
49
49
  - .travis.yml
50
50
  - Gemfile
51
+ - README.md
51
52
  - beaker-puppet_install_helper.gemspec
52
53
  - lib/beaker/puppet_install_helper.rb
53
54
  - spec/spec_helper.rb