rundock 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/rundock/attribute/node_attribute.rb +3 -1
- data/lib/rundock/builder/operation_builder.rb +17 -7
- data/lib/rundock/operation/task.rb +1 -0
- data/lib/rundock/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: 6fb16148337d2df02dd98c9c568f73053ae4f0fe
|
|
4
|
+
data.tar.gz: 7146e8b107b4735c73b547e6627447bb71328ae2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d03e7b40cf4896e5ce763dd9ea1a46e0e4a560f33fb95f3d76f847fb3fd48c0aa89617fd1062d7ce3f67f5664df2f41d1cae53ad80f7f93416777f682bf1553c
|
|
7
|
+
data.tar.gz: 4b40aa2cde7aaa29c94bc8730e05ab537cc71bc5e4d18696bfe6b8c171c39228cf0e7fec4ea62894a73a1a570103a9da524cb02cd27eba3d6172b3b96d247b2d
|
data/CHANGELOG.md
CHANGED
|
@@ -38,7 +38,7 @@ module Rundock
|
|
|
38
38
|
|
|
39
39
|
next unless node
|
|
40
40
|
|
|
41
|
-
ope = build_operations(k, Array(v), node_attribute, @options)
|
|
41
|
+
ope = build_operations(k, Array(v), node_attribute, @options, false)
|
|
42
42
|
node.add_operation(ope) if ope
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -54,7 +54,7 @@ module Rundock
|
|
|
54
54
|
scen = Scenario.new
|
|
55
55
|
|
|
56
56
|
tasks.each do |k, v|
|
|
57
|
-
ope = build_operations(k, Array(v), node_attribute, nil)
|
|
57
|
+
ope = build_operations(k, Array(v), node_attribute, nil, true)
|
|
58
58
|
node.add_operation(ope) if ope
|
|
59
59
|
end
|
|
60
60
|
|
|
@@ -84,16 +84,26 @@ module Rundock
|
|
|
84
84
|
Rundock::OperationFactory.instance(:command).create(Array(command), node_attributes.list)
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
def build_operations(ope_type, ope_content, node_attributes, cli_options)
|
|
88
|
-
if cli_options
|
|
89
|
-
|
|
87
|
+
def build_operations(ope_type, ope_content, node_attributes, cli_options, recursive)
|
|
88
|
+
cli_options = {} if cli_options.nil?
|
|
89
|
+
|
|
90
|
+
if cli_options[:command] &&
|
|
90
91
|
(ope_type == :command || ope_type == :task)
|
|
91
92
|
Logger.debug(%("--command or -c" option is specified and ignore scenario file.))
|
|
92
93
|
return
|
|
93
94
|
end
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
unless recursive
|
|
97
|
+
# apply cli options
|
|
98
|
+
if !cli_options.key?(:run_anyway)
|
|
99
|
+
node_attributes.errexit = true
|
|
100
|
+
else
|
|
101
|
+
node_attributes.errexit = !cli_options[:run_anyway]
|
|
102
|
+
end
|
|
103
|
+
node_attributes.dry_run = (cli_options && cli_options[:dry_run]) ? true : false
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# override by scenario
|
|
97
107
|
node_attributes.define_attr(ope_type, ope_content)
|
|
98
108
|
Rundock::OperationFactory.instance(ope_type).create(Array(ope_content), node_attributes.list)
|
|
99
109
|
end
|
data/lib/rundock/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rundock
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- hiracy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|