smart_proxy_ansible 3.5.2 → 3.5.4
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeca31386ddf249d6cbce37e14bac2be1217132e9d7700595d1a98bfce4f9edb
|
4
|
+
data.tar.gz: d46c8e35fe05c3d2808226eda74a14b26cf77a5bfcc66f494d6e680f21893173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64fc645a04b2348cb94e9975a059ff72d053de4c0f95d256f10c2219eb68f691fb0abdcb1d08d2893467cd607ab49cd474a1f1c633718c8ef6c46c256c2a6ca
|
7
|
+
data.tar.gz: e093cc229af6dffb46ead2c4d7118d53e87d3a78ab67d1d5256130b95ae95b9beccb89186d95365e789abcbc99df67d661b1cc4a6d90dd4e90ffa3ec571b24bc
|
@@ -68,7 +68,7 @@ module Proxy::Ansible
|
|
68
68
|
def publish_exit_status(status)
|
69
69
|
process_artifacts
|
70
70
|
super
|
71
|
-
@targets.each_key { |host| publish_exit_status_for(host,
|
71
|
+
@targets.each_key { |host| publish_exit_status_for(host, @exit_statuses[host]) } if status != 0
|
72
72
|
end
|
73
73
|
|
74
74
|
def initialize_command(*command)
|
@@ -143,19 +143,27 @@ module Proxy::Ansible
|
|
143
143
|
if event['event'] == 'playbook_on_stats'
|
144
144
|
failures = event.dig('event_data', 'failures') || {}
|
145
145
|
unreachable = event.dig('event_data', 'dark') || {}
|
146
|
+
rescued = event.dig('event_data', 'rescued') || {}
|
146
147
|
header, *rows = event['stdout'].strip.lines.map(&:chomp)
|
147
148
|
@outputs.keys.select { |key| key.is_a? String }.each do |host|
|
148
149
|
line = rows.find { |row| row =~ /#{host}/ }
|
149
150
|
publish_data_for(host, [header, line].join("\n"), 'stdout')
|
150
151
|
|
151
152
|
# If the task has been rescued, it won't consider a failure
|
152
|
-
if @exit_statuses[host].to_i != 0 && failures[host].to_i <= 0 && unreachable[host].to_i <= 0
|
153
|
+
if @exit_statuses[host].to_i != 0 && failures[host].to_i <= 0 && unreachable[host].to_i <= 0 && rescued[host].to_i > 0
|
153
154
|
publish_exit_status_for(host, 0)
|
154
155
|
end
|
155
156
|
end
|
156
157
|
else
|
157
158
|
broadcast_data(event['stdout'] + "\n", 'stdout')
|
158
159
|
end
|
160
|
+
|
161
|
+
# If the run ends early due to an error - fail all other tasks
|
162
|
+
if event['event'] == 'error'
|
163
|
+
@outputs.keys.select { |key| key.is_a? String }.each do |host|
|
164
|
+
@exit_statuses[host] = 4 if @exit_statuses[host].to_i == 0
|
165
|
+
end
|
166
|
+
end
|
159
167
|
end
|
160
168
|
|
161
169
|
def write_inventory
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|