mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-07-27 00:51:39 +08:00
add a playbook_start and end var to the pb info
This commit is contained in:
@@ -242,6 +242,7 @@ class CallbackModule(object):
|
||||
# write out playbook info now
|
||||
if not self._play_count:
|
||||
pb_info = {}
|
||||
pb_info['playbook_start'] = time.time()
|
||||
pb_info['playbook'] = path
|
||||
pb_info['userid'] = os.getlogin()
|
||||
pb_info['extra_vars'] = play.playbook.extra_vars
|
||||
@@ -266,6 +267,7 @@ class CallbackModule(object):
|
||||
results[host] = stats.summarize(host)
|
||||
logmech.log(host, 'STATS', results[host])
|
||||
logmech.play_log(json.dumps({'stats': results}, indent=4))
|
||||
logmech.play_log(json.dumps({'playbook_end': time.time()}, indent=4))
|
||||
print 'logs written to: %s' % logmech.logpath_play
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user