Make fatal errors red
This commit is contained in:
parent
e1b1702616
commit
7acc0a632b
1 changed files with 7 additions and 6 deletions
|
@ -281,15 +281,16 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
||||||
self.stats = stats
|
self.stats = stats
|
||||||
self._async_notified = {}
|
self._async_notified = {}
|
||||||
|
|
||||||
def on_unreachable(self, host, msg):
|
def on_unreachable(self, host, results):
|
||||||
item = None
|
item = None
|
||||||
if type(msg) == dict:
|
if type(results) == dict:
|
||||||
item = msg.get('item', None)
|
item = results.get('item', None)
|
||||||
if item:
|
if item:
|
||||||
print "fatal: [%s] => (item=%s) => %s" % (host, item, msg)
|
msg = "fatal: [%s] => (item=%s) => %s" % (host, item, results)
|
||||||
else:
|
else:
|
||||||
print "fatal: [%s] => %s" % (host, msg)
|
msg = "fatal: [%s] => %s" % (host, results)
|
||||||
super(PlaybookRunnerCallbacks, self).on_unreachable(host, msg)
|
print stringc(msg, 'red')
|
||||||
|
super(PlaybookRunnerCallbacks, self).on_unreachable(host, results)
|
||||||
|
|
||||||
def on_failed(self, host, results, ignore_errors=False):
|
def on_failed(self, host, results, ignore_errors=False):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue