ansible.posix.json – Ansible screen output as JSON

From Get docs
Ansible/docs/2.11/collections/ansible/posix/json callback


ansible.posix.json – Ansible screen output as JSON

Note

This plugin is part of the ansible.posix collection (version 1.1.1).

To install it use: ansible-galaxy collection install ansible.posix.

To use it in a playbook, specify: ansible.posix.json.


Synopsis

  • This callback converts all events into JSON output to stdout

Requirements

The below requirements are needed on the local controller node that executes this callback.

  • Set as stdout in config

Parameters

Parameter Choices/Defaults Configuration Comments

show_custom_stats

boolean

  • no

  • yes

ini entries: [defaults]show_custom_stats = no


env:ANSIBLE_SHOW_CUSTOM_STATS

This adds the custom stats set via the set_stats plugin to the play recap



Notes

Note

  • When using a strategy such as free, host_pinned, or a custom strategy, host results will be added to new task results in .plays[].tasks[]. As such, there will exist duplicate task objects indicated by duplicate task IDs at .plays[].tasks[].task.id, each with an individual host result for the task.


© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/ansible/posix/json_callback.html