summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/callback/json.py
Commit message (Collapse)AuthorAgeFilesLines
* Add start and end timestamp to task and play result in json callback (#39277)Felix Schmidt2018-05-251-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Restore skipped/failed in JSON callback, add custom facts (#37204)Matt Martz2018-03-201-9/+50
| | | | | | | | | | | | * Restore skipped/failed keys. Fixes #37050 * Display custom stats. Fixes #37184 * Add version_added * Drop fallback, use self.get_option * Remove unused import
* callback: Get handlers with json callback plugin (#35842)Alex Tsitsimpis2018-02-081-0/+3
| | | | | | | | | | | Implement the `v2_playbook_on_handler_task_start()' method in the json callback plugin to correctly include handlers in the results. This fixes a bug where the last task in the results returned by json callback would be wrong if an unconditional handler was triggered, since the result of that handler would overwrite the result of the last task. Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
* fixes typo ansbile to ansibleJan Fader2018-01-021-1/+1
|
* Port ansible doc for plugins to use DOCUMENTATION variablesToshio Kuratomi2017-09-111-6/+5
| | | | | | | * Using docstrings conflicts with the standard use of docstrings * PYTHON_OPTIMIZE=2 will omit docstrings. Using docstrings makes future changes to the plugin and module code subject to the requirement that we ensure it won't be run with optimization.
* fixes to config/setting retrievalBrian Coca2017-09-091-18/+6
| | | | | | | | | | | | | | | | | | | | | | - better variable precedence management - universal plugin option handling - also updated comments for future directions - leverage fragments for plugins - removed fact namespacing - added 'firendly name' field - updated missing descriptions - removed some unused yaml entries, updated others to reflect possible future - documented more plugins - allow reading docs using alias - short licenses - corrected args for 'all plugins' - fixed -a option for ansible-doc - updated vars plugins to allow docs - fixed 'gathering' - only set options IF connection - added path list and renamed pathspec mostly the diff is , vs : as separator - readded removed config entries that were deprecated but had no message ... and deprecated again - now deprecated entries give warning when set
* Ansible Config part2 (#27448)Brian Coca2017-08-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ansible Config part2 - made dump_me nicer, added note this is not prod - moved internal key removal function to vars - carry tracebacks in errors we can now show tracebacks for plugins on vvv - show inventory plugin tracebacks on vvv - minor fixes to cg groups plugin - draft config from plugin docs - made search path warning 'saner' (top level dirs only) - correctly display config entries and others - removed unneeded code - commented out some conn plugin specific from base.yml - also deprecated sudo/su - updated ssh conn docs - shared get option method for connection plugins - note about needing eval for defaults - tailored yaml ext - updated strategy entry - for connection pliugins, options load on plugin load - allow for long types in definitions - better display in ansible-doc - cleaned up/updated source docs and base.yml - added many descriptions - deprecated include toggles as include is - draft backwards compat get_config - fixes to ansible-config, added --only-changed - some code reoorg - small license headers - show default in doc type - pushed module utils details to 5vs - work w/o config file - PEPE ATE! - moved loader to it's own file - fixed rhn_register test - fixed boto requirement in make tests - I ate Pepe - fixed dynamic eval of defaults - better doc code skip ipaddr filter tests when missing netaddr removed devnull string from config better becoem resolution * killed extra space with extreeme prejudice cause its an affront against all that is holy that 2 spaces touch each other! shippable timing out on some images, but merging as it passes most
* Remove direct calls to print and cleanup importsToshio Kuratomi2016-11-071-1/+1
| | | | All display of information should go through display instead of through print.
* Add json callback to be used in replace of the default stdout to print a ↵Matt Martz2016-02-181-0/+83
JSON structure to stdout