beaker-task_helper 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0c3360cb6036e4bb6a390526c344fd527e5c0015
4
- data.tar.gz: d127f764245da1d547d64cf84b8faef8783e5633
2
+ SHA256:
3
+ metadata.gz: dcd238c08332ba479255427138485576fb735ac28ad1a66d87f69dcc8418503b
4
+ data.tar.gz: e39d27c1db8dd362d4eac66f159547c3313e809787b2d1fd7d8ae18a0302efde
5
5
  SHA512:
6
- metadata.gz: 9a0cc3efbc57cd08afbdaaa6ba940edcf3663665de2fbcc36e6699620a59d42e9ffe5592fc0191097057bfbff071f474fb6fee1107d833834dcad077a190dbb8
7
- data.tar.gz: ed427a9a31239dbde4f62976ba938b93c10779cc808bfb6dab9a9f2ba442355e0fe0b0832be7fe51bbbfda080d2fab67ce84cb6047f729768d2f8b9524843d87
6
+ metadata.gz: 764f938eb06c80ed4a92b9622fecd7505679eab588b36e786b44053c03dc1d3afebd557128eebaabf37c1828e2f27f36cd0161862f55d40efaa18aa6a6bdb54d
7
+ data.tar.gz: 573e0bdc45da4f1929d88d8416d417a5e5eb1c404a338c48891b96a7d3ce892e3d9ac90b2308ceda5d8e61665371063a830f941566bf7eda31f398deb56d74a4
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Change Log
2
+ ## 1.6.0
3
+ ### Fixed
4
+ - Updates host from `localhost` to `127.0.0.1`.
5
+
6
+ ### Added
7
+ - `BOLT_VERSION` is now dependent on Puppet version.
8
+ - `bolt_path` is now dependent on Puppet version.
2
9
 
3
10
  ## 1.5.2
4
11
  ### Added
@@ -18,7 +18,12 @@ module Beaker::TaskHelper # rubocop:disable Style/ClassAndModuleChildren
18
18
  'root'
19
19
  end
20
20
 
21
- BOLT_VERSION = '0.16.1'.freeze
21
+ BOLT_VERSION = if ENV['BEAKER_PUPPET_COLLECTION'].nil? || ENV['BEAKER_PUPPET_COLLECTION'] == 'pc1'
22
+ # puppet4 uses an older version of ruby (2.1.9) that bolt has stopped supporting
23
+ '0.16.1'.freeze
24
+ else
25
+ '0.22.0'.freeze
26
+ end
22
27
 
23
28
  def install_bolt_on(hosts, version = BOLT_VERSION, source = nil)
24
29
  unless default[:docker_image_commands].nil?
@@ -73,7 +78,7 @@ INSTALL_BOLT_PP
73
78
  host = master.hostname if host.nil?
74
79
  run_puppet_task(task_name: task_name, params: params, host: host, format: format)
75
80
  else
76
- host = 'localhost' if host.nil?
81
+ host = '127.0.0.1' if host.nil?
77
82
  run_bolt_task(task_name: task_name, params: params,
78
83
  password: password, host: host, format: format)
79
84
  end
@@ -87,9 +92,13 @@ INSTALL_BOLT_PP
87
92
  end
88
93
 
89
94
  def run_bolt_task(task_name:, params: nil, password: DEFAULT_PASSWORD,
90
- host: 'localhost', format: 'human', module_path: nil)
95
+ host: '127.0.0.1', format: 'human', module_path: nil)
91
96
  if fact_on(default, 'osfamily') == 'windows'
92
- bolt_path = '/cygdrive/c/Program\ Files/Puppet\ Labs/Puppet/sys/ruby/bin/bolt.bat'
97
+ bolt_path = if ENV['BEAKER_PUPPET_COLLECTION'].nil? || ENV['BEAKER_PUPPET_COLLECTION'] == 'pc1' || ENV['BEAKER_PUPPET_COLLECTION'] == 'puppet5'
98
+ '/cygdrive/c/Program\ Files/Puppet\ Labs/Puppet/sys/ruby/bin/bolt.bat'
99
+ else
100
+ '/cygdrive/c/Program\ Files/Puppet\ Labs/Puppet/puppet/bin/bolt.bat'
101
+ end
93
102
  module_path ||= 'C:/ProgramData/PuppetLabs/code/modules'
94
103
 
95
104
  if version_is_less('0.15.0', BOLT_VERSION)
@@ -124,7 +133,7 @@ INSTALL_BOLT_PP
124
133
  on(default, bolt_full_cli, acceptable_exit_codes: [0, 1, 2]).stdout
125
134
  end
126
135
 
127
- def run_puppet_task(task_name:, params: nil, host: 'localhost', format: 'human')
136
+ def run_puppet_task(task_name:, params: nil, host: '127.0.0.1', format: 'human')
128
137
  args = ['task', 'run', task_name, '--nodes', host]
129
138
  if params.class == Hash
130
139
  args << '--params'
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module TaskHelper
3
- VERSION = '1.5.2'.freeze
3
+ VERSION = '1.6.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-task_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-15 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.5.1
139
+ rubygems_version: 2.7.6
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Ruby gem to help testing tasks with Beaker