try to make log detail show check vs actual changes
This commit is contained in:
parent
a8f0718281
commit
8455e65fbf
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,9 @@ class LogMech(object):
|
|||
|
||||
if category == 'OK' and data.get('changed', False):
|
||||
category = 'CHANGED'
|
||||
|
||||
|
||||
if self.play_info.check:
|
||||
category = 'CHECK:' + category
|
||||
|
||||
fd = open(self.logpath_play + '/' + host + '.log', 'a')
|
||||
now = time.strftime(TIME_FORMAT, time.localtime())
|
||||
|
@ -253,6 +255,7 @@ class CallbackModule(object):
|
|||
pb_info['extra_vars'] = play.playbook.extra_vars
|
||||
pb_info['inventory'] = play.playbook.inventory.host_list
|
||||
pb_info['playbook_checksum'] = utils.md5(path)
|
||||
pb_info['check'] = play.playbook.check
|
||||
logmech.play_log(json.dumps(pb_info, indent=4))
|
||||
|
||||
self._play_count += 1
|
||||
|
@ -262,6 +265,7 @@ class CallbackModule(object):
|
|||
info['hosts'] = play.hosts
|
||||
info['transport'] = play.transport
|
||||
info['number'] = self._play_count
|
||||
info['check'] = play.playbook.check
|
||||
logmech.play_info = info
|
||||
logmech.play_log(json.dumps(info, indent=4))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue