community.general.tasks_only callback – Only show tasks
Note
This callback plugin is part of the community.general collection (version 12.6.1).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.tasks_only.
New in community.general 11.1.0
Callback plugin
This plugin is a stdout callback. You can use only use one stdout callback at a time. Additional aggregate or notification callbacks can be enabled though. See Callback plugins for more information on callback plugins.
Synopsis
- Removes play start and stats marker from ansible.builtin.default‘s output.
- Can be used to generate output for documentation examples. For this, the
number_of_columnsoption should be set to an explicit value.
Parameters
Parameter | Comments |
|---|---|
check_mode_markers boolean added in Ansible 2.9 | Toggle to control displaying markers when running in check mode. The markers are Choices:
Configuration:
|
display_failed_stderr boolean added in Ansible 2.7 | Toggle to control whether failed and unreachable tasks are displayed to STDERR rather than STDOUT. Choices:
Configuration:
|
display_ok_hosts boolean added in Ansible 2.7 | Toggle to control displaying ‘ok’ task/host results in a task. Choices:
Configuration:
|
display_skipped_hosts boolean | Toggle to control displaying skipped task/host results in a task. Choices:
Configuration:
|
number_of_columns integer | Sets the number of columns for Ansible’s display. Configuration:
|
pretty_results boolean added in community.general 11.2.0 | Configure the result format to be more readable. When Setting this option to When set to Choices:
Configuration:
|
result_format string added in community.general 11.2.0 | Define the task result format used in the callback output. These formats do not cause the callback to emit valid JSON or YAML formats. The output contains these formats interspersed with other non-machine parsable data. Choices:
Configuration:
|
result_indentation integer added in ansible-core 2.20 | Allows to configure indentation for YAML and verbose/pretty JSON. Please note that for Default: Configuration:
|
show_custom_stats boolean | This adds the custom stats set via the set_stats plugin to the play recap. Choices:
Configuration:
|
show_per_host_start boolean added in Ansible 2.9 | This adds output that shows when a task starts to execute for each host. Choices:
Configuration:
|
show_task_path_on_failure boolean added in ansible-core 2.11 | When a task fails, display the path to the file containing the failed task and the line number. This information is displayed automatically for every task when running with Choices:
Configuration:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
Examples
--- # Enable callback in ansible.cfg: ansible_config: |- [defaults] stdout_callback = community.general.tasks_only --- # Enable callback with environment variables: environment_variable: |- ANSIBLE_STDOUT_CALLBACK=community.general.tasks_only
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/tasks_only_callback.html