bolt 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/exe/bolt +3 -2
- data/lib/bolt/cli.rb +99 -92
- data/lib/bolt/config.rb +7 -8
- data/lib/bolt/error.rb +20 -3
- data/lib/bolt/executor.rb +44 -45
- data/lib/bolt/logger.rb +28 -52
- data/lib/bolt/node.rb +12 -41
- data/lib/bolt/node/orch.rb +28 -34
- data/lib/bolt/node/ssh.rb +26 -21
- data/lib/bolt/node/winrm.rb +41 -19
- data/lib/bolt/notifier.rb +2 -2
- data/lib/bolt/outputter/human.rb +34 -29
- data/lib/bolt/outputter/json.rb +4 -10
- data/lib/bolt/pal.rb +106 -0
- data/lib/bolt/result.rb +90 -87
- data/lib/bolt/result_set.rb +94 -0
- data/lib/bolt/target.rb +61 -13
- data/lib/bolt/version.rb +1 -1
- data/modules/boltlib/lib/puppet/datatypes/result.rb +18 -0
- data/modules/boltlib/lib/puppet/datatypes/resultset.rb +22 -0
- data/modules/boltlib/lib/puppet/datatypes/target.rb +4 -1
- data/modules/boltlib/lib/puppet/functions/file_upload.rb +15 -10
- data/modules/boltlib/lib/puppet/functions/run_command.rb +15 -8
- data/modules/boltlib/lib/puppet/functions/run_script.rb +15 -26
- data/modules/boltlib/lib/puppet/functions/run_task.rb +17 -15
- metadata +23 -9
- data/lib/bolt/execution_result.rb +0 -109
- data/lib/bolt/formatter.rb +0 -9
- data/lib/bolt/node_uri.rb +0 -42
- data/modules/boltlib/lib/puppet/datatypes/executionresult.rb +0 -30
data/lib/bolt/node_uri.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'addressable/uri'
|
2
|
-
|
3
|
-
module Bolt
|
4
|
-
class NodeURI
|
5
|
-
def initialize(string, transport = 'ssh')
|
6
|
-
@uri = parse(string, transport)
|
7
|
-
end
|
8
|
-
|
9
|
-
def parse(string, transport)
|
10
|
-
if string =~ %r{^[^:]+://}
|
11
|
-
Addressable::URI.parse(string)
|
12
|
-
else
|
13
|
-
Addressable::URI.parse("#{transport}://#{string}")
|
14
|
-
end
|
15
|
-
end
|
16
|
-
private :parse
|
17
|
-
|
18
|
-
def hostname
|
19
|
-
@uri.hostname
|
20
|
-
end
|
21
|
-
|
22
|
-
def port
|
23
|
-
@uri.port
|
24
|
-
end
|
25
|
-
|
26
|
-
def user
|
27
|
-
Addressable::URI.unencode_component(
|
28
|
-
@uri.user
|
29
|
-
)
|
30
|
-
end
|
31
|
-
|
32
|
-
def password
|
33
|
-
Addressable::URI.unencode_component(
|
34
|
-
@uri.password
|
35
|
-
)
|
36
|
-
end
|
37
|
-
|
38
|
-
def scheme
|
39
|
-
@uri.scheme
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
Puppet::DataTypes.create_type('ExecutionResult') do
|
2
|
-
interface <<-PUPPET
|
3
|
-
attributes => {
|
4
|
-
'result_hash' => Hash[
|
5
|
-
String[1],
|
6
|
-
Struct[
|
7
|
-
Optional[value] => Data,
|
8
|
-
Optional[error] => Struct[
|
9
|
-
msg => String[1],
|
10
|
-
Optional[kind] => String[1],
|
11
|
-
Optional[issue_code] => String[1],
|
12
|
-
Optional[details] => Hash[String[1], Data]]]]
|
13
|
-
},
|
14
|
-
functions => {
|
15
|
-
count => Callable[[], Integer],
|
16
|
-
empty => Callable[[], Boolean],
|
17
|
-
error_nodes => Callable[[], ExecutionResult],
|
18
|
-
names => Callable[[], Array[String[1]]],
|
19
|
-
ok => Callable[[], Boolean],
|
20
|
-
ok_nodes => Callable[[], ExecutionResult],
|
21
|
-
value => Callable[[String[1]], Variant[Error, Data]],
|
22
|
-
values => Callable[[], Array[Variant[Error,Data]]],
|
23
|
-
'[]' => Callable[[String[1]], Variant[Error, Data]]
|
24
|
-
}
|
25
|
-
PUPPET
|
26
|
-
|
27
|
-
load_file('bolt/executionresult')
|
28
|
-
|
29
|
-
implementation_class Bolt::ExecutionResult
|
30
|
-
end
|