community.general.tasks_only callback – Only show tasks
Note
This callback plugin is part of the community.general collection (version 11.2.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_columns
option should be set to an explicit value.
Parameters
Parameter |
Comments |
---|---|
Toggle to control displaying markers when running in check mode. The markers are Choices:
Configuration:
|
|
Toggle to control whether failed and unreachable tasks are displayed to STDERR rather than STDOUT. Choices:
Configuration:
|
|
Toggle to control displaying ‘ok’ task/host results in a task. Choices:
Configuration:
|
|
Toggle to control displaying skipped task/host results in a task. Choices:
Configuration:
|
|
Sets the number of columns for Ansible’s display. Configuration:
|
|
Configure the result format to be more readable. When Setting this option to When set to Choices:
Configuration:
|
|
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:
|
|
This adds the custom stats set via the set_stats plugin to the play recap. Choices:
Configuration:
|
|
This adds output that shows when a task starts to execute for each host. Choices:
Configuration:
|
|
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