beaker-task_helper 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/lib/beaker/task_helper.rb +9 -3
- data/lib/beaker/task_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88d7c18680282490328a217db93b882d00a37d56
|
4
|
+
data.tar.gz: 31f9f515613511823ac75c3bb0c72c2e9a448e98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b748cbbe7ac03e3275f4e66a0fdcdddc917b98872e6913814b978426c67776d24fb40bd3437eb64a2ee172769d85f2dce052b46b359e81080ae387fed77950
|
7
|
+
data.tar.gz: 2f3ba90db5a68378b252e66a3a429cd5520b8d1bca40de26829e8ef8568b01615a534912d1e25a3a1295849e0989ead3f6bf9f582bf4f285ae74504bfe336878
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/beaker/task_helper.rb
CHANGED
@@ -48,11 +48,13 @@ INSTALL_BOLT_PP
|
|
48
48
|
on(master, puppet('access', 'login', '--username', user, '--lifetime', lifetime), stdin: password)
|
49
49
|
end
|
50
50
|
|
51
|
-
def run_task(task_name:, params: nil, password: DEFAULT_PASSWORD, format: 'human')
|
51
|
+
def run_task(task_name:, params: nil, password: DEFAULT_PASSWORD, host: nil, format: 'human')
|
52
52
|
output = if pe_install?
|
53
|
-
|
53
|
+
host = master.hostname if host.nil?
|
54
|
+
run_puppet_task(task_name: task_name, params: params, host: host)
|
54
55
|
else
|
55
|
-
|
56
|
+
host = 'localhost' if host.nil?
|
57
|
+
run_bolt_task(task_name: task_name, params: params, password: password, host: host)
|
56
58
|
end
|
57
59
|
|
58
60
|
if format == 'json'
|
@@ -105,6 +107,10 @@ INSTALL_BOLT_PP
|
|
105
107
|
expect(result).to match(regex)
|
106
108
|
end
|
107
109
|
end
|
110
|
+
|
111
|
+
def task_summary_line(total_hosts: 1, success_hosts: 1)
|
112
|
+
"Job completed. #{success_hosts}/#{total_hosts} nodes succeeded|Ran on #{total_hosts} node"
|
113
|
+
end
|
108
114
|
end
|
109
115
|
|
110
116
|
include Beaker::TaskHelper
|
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.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|