foreman_ansible_core 4.1.0 → 4.1.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: cc5b524830b6cf92b7715fdc19d9bc65e9e863b247ecb3dbe2f35aa7c8ee4e46
4
- data.tar.gz: e3c669c0942e9d128d24ba4ffcf8896c9602d69058e286d1398dd531edd73ebf
3
+ metadata.gz: 7e9a9d4a9f83b446ed1941f51ce21681afc64cbab85372b53c30bc301759b251
4
+ data.tar.gz: 0de9e25099dc2a47969e53806fbc333befa14233be577e9874ed5f71a734a429
5
5
  SHA512:
6
- metadata.gz: c037f11562f8a20db823fefec5d9ffbc1aef49aa3a445fe78555acbc2ded7a84fea2863cfb1e88cb04ef8d11e93ad51b9700e6f81dedec1987e63e7677134125
7
- data.tar.gz: dc1dce5cc48e298bee1708f9bfef4f20d86423860ac7761ea440b179ce3e4a44f70ef65aabee9299a95bae4e0a99640602e007035fcbca53ed62900951a17f37
6
+ metadata.gz: d64a75aa2438b35ced0c5065d419c8fa992bd366cd6a14e256d411502f47e17ee1963f0ccea94d7797969a871718ccfc4a01e35868cda8e34ba591005cc927c1
7
+ data.tar.gz: d78a88b0cb187f9986b35e6cf7bb771762485e7445f86372338c2ef036140ba8fce2c5db429ec812ffd6ac697c9a2199089acbaf89dbe6289418b785c74df624
@@ -80,10 +80,17 @@ module ForemanAnsibleCore
80
80
  def handle_broadcast_data(event)
81
81
  log_event("broadcast", event)
82
82
  if event['event'] == 'playbook_on_stats'
83
+ failures = event.dig('event_data', 'failures') || {}
84
+ unreachable = event.dig('event_data', 'dark') || {}
83
85
  header, *rows = event['stdout'].strip.lines.map(&:chomp)
84
86
  @outputs.keys.select { |key| key.is_a? String }.each do |host|
85
87
  line = rows.find { |row| row =~ /#{host}/ }
86
88
  publish_data_for(host, [header, line].join("\n"), 'stdout')
89
+
90
+ # If the task has been rescued, it won't consider a failure
91
+ if @exit_statuses[host].to_i != 0 && failures[host].to_i <= 0 && unreachable[host].to_i <= 0
92
+ publish_exit_status_for(host, 0)
93
+ end
87
94
  end
88
95
  else
89
96
  broadcast_data(event['stdout'] + "\n", 'stdout')
@@ -125,7 +132,7 @@ module ForemanAnsibleCore
125
132
  end
126
133
 
127
134
  def check_mode?
128
- @check_mode == true
135
+ @check_mode == true && @rex_command == false
129
136
  end
130
137
 
131
138
  def prepare_directory_structure
@@ -20,7 +20,7 @@ module ForemanAnsibleCore
20
20
  # Discard everything apart from hostname to be able to tell the actions
21
21
  # apart when debugging
22
22
  def transform_input(input)
23
- { 'action_input' => input['action_input'].slice('name') }
23
+ { 'action_input' => super['action_input'].slice('name', :task_id) }
24
24
  end
25
25
 
26
26
  # def self.input_format
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAnsibleCore
4
- VERSION = '4.1.0'
4
+ VERSION = '4.1.4'
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: 4.1.0
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-17 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_remote_execution_core