foreman_ansible_core 3.0.4 → 3.0.5

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: 8b9ed358d85932fcb1710bc33ff885319f5478daa58083520749a99a2af67626
4
- data.tar.gz: 9efdcf103ab555abb5ea60d1e8e757110a514d73a4dfa00bcd1f5cef68c81e0b
3
+ metadata.gz: 6d8f767c115d90811e6d131c931a3b26759a678b3cebce797735735c99deffb2
4
+ data.tar.gz: 7d51f480e657bcc0aaa6bbcfe8d24af0b18772468d384e09fdcacb4b3c13a705
5
5
  SHA512:
6
- metadata.gz: b1ab98aeae41f8232d6eef1d3057e332eae7c7716768f54862b259dd7aae4236c20a0b628e8164336fcdb9d30d7ff29387f3f72eb118dd6faa55a92a745c44fe
7
- data.tar.gz: 0e1fc4865413fc4d5be78ad7a5e5b7741103aa22618cd419d2b52ed584042588faac547427bdc46447c5fcb354b1015b704e71e75123ff89a0cdcc2daa99785c
6
+ metadata.gz: fd37c7c252342f558ae43153e0faa5f44c0a568ef5ecdad2a397ef210dc9708aa16627be056cd0b0c4d262aebce7ca95f5685e1f07dda52586530439bf1439c6
7
+ data.tar.gz: 0d57f0807a3324a7db4494ef9bc81149d3626b8beac521365be7b21146ee2c32a1f2d026d28af658db731621e78333f2eae6cd5dd8badf2b7e518f57aab78d4b
@@ -72,10 +72,16 @@ module ForemanAnsibleCore
72
72
  def handle_broadcast_data(event)
73
73
  log_event("broadcast", event)
74
74
  if event['event'] == 'playbook_on_stats'
75
+ failures = event.dig('event_data', 'failures') || {}
75
76
  header, *rows = event['stdout'].strip.lines.map(&:chomp)
76
77
  @outputs.keys.select { |key| key.is_a? String }.each do |host|
77
78
  line = rows.find { |row| row =~ /#{host}/ }
78
79
  publish_data_for(host, [header, line].join("\n"), 'stdout')
80
+
81
+ # If the task has been rescued, it won't consider a failure
82
+ if @exit_statuses[host].to_i != 0 && failures[host].to_i <= 0
83
+ publish_exit_status_for(host, 0)
84
+ end
79
85
  end
80
86
  else
81
87
  broadcast_data(event['stdout'] + "\n", 'stdout')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAnsibleCore
4
- VERSION = '3.0.4'
4
+ VERSION = '3.0.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -91,7 +91,7 @@ homepage: https://github.com/theforeman/foreman_ansible
91
91
  licenses:
92
92
  - GPL-3.0
93
93
  metadata: {}
94
- post_install_message:
94
+ post_install_message:
95
95
  rdoc_options: []
96
96
  require_paths:
97
97
  - lib
@@ -106,8 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.0.3
110
- signing_key:
109
+ rubygems_version: 3.1.2
110
+ signing_key:
111
111
  specification_version: 4
112
112
  summary: 'Ansible integration with Foreman (theforeman.org): core bits'
113
113
  test_files: []