ansible/lib
Felix Schmidt b7b19d139e Add start and end timestamp to task and play result in json callback (#39277)
* Add start and end timestamp to task result in json callback

Currently, the timestamp information is only provided directly by a few
Ansible modules (e.g. the command module, which shows the runtime of a
command per host result).
This change adds an 'overall' time information to all executed tasks. The
delta between both timestamps shows how long it took a task to finish
across all hosts/nodes.

This patch is also proposed for zuul and can be found here:
https://review.openstack.org/#/c/563888

* Add missing timezone information to 'start' and 'end' timestamps

As the datetime.isoformat() function is missing the timezone information,
we assume it's local time.

* Nest 'start' and 'end' timestamps in 'duration' field.

To clarify the purpose of those fields.

* Add 'start' and 'end' timestamps also for plays
2018-05-25 11:19:14 -05:00
..
ansible Add start and end timestamp to task and play result in json callback (#39277) 2018-05-25 11:19:14 -05:00