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 +5 -5
- data/CHANGELOG.md +7 -0
- data/lib/beaker-task_helper.rb +14 -5
- data/lib/beaker-task_helper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dcd238c08332ba479255427138485576fb735ac28ad1a66d87f69dcc8418503b
|
4
|
+
data.tar.gz: e39d27c1db8dd362d4eac66f159547c3313e809787b2d1fd7d8ae18a0302efde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 764f938eb06c80ed4a92b9622fecd7505679eab588b36e786b44053c03dc1d3afebd557128eebaabf37c1828e2f27f36cd0161862f55d40efaa18aa6a6bdb54d
|
7
|
+
data.tar.gz: 573e0bdc45da4f1929d88d8416d417a5e5eb1c404a338c48891b96a7d3ce892e3d9ac90b2308ceda5d8e61665371063a830f941566bf7eda31f398deb56d74a4
|
data/CHANGELOG.md
CHANGED
data/lib/beaker-task_helper.rb
CHANGED
@@ -18,7 +18,12 @@ module Beaker::TaskHelper # rubocop:disable Style/ClassAndModuleChildren
|
|
18
18
|
'root'
|
19
19
|
end
|
20
20
|
|
21
|
-
BOLT_VERSION = '
|
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 = '
|
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: '
|
95
|
+
host: '127.0.0.1', format: 'human', module_path: nil)
|
91
96
|
if fact_on(default, 'osfamily') == 'windows'
|
92
|
-
bolt_path = '
|
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: '
|
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'
|
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.
|
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-
|
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.
|
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
|