ansible.builtin.default callback – default Ansible screen output

Note

This callback plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name default even without specifying the collections: keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same callback plugin name.

Synopsis

  • This is the default output callback for ansible-playbook.

Requirements

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

  • set as stdout in configuration

Parameters

Parameter

Comments

check_mode_markers

boolean

added in 2.9 of ansible.builtin

Toggle to control displaying markers when running in check mode.

The markers are DRY RUN at the beginning and ending of playbook execution (when calling ansible-playbook --check) and CHECK MODE as a suffix at every play and task that is run in check mode.

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    check_mode_markers = no
    
  • Environment variable: ANSIBLE_CHECK_MODE_MARKERS

display_failed_stderr

boolean

added in 2.7 of ansible.builtin

Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT)

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    display_failed_stderr = no
    
  • Environment variable: ANSIBLE_DISPLAY_FAILED_STDERR

display_ok_hosts

boolean

added in 2.7 of ansible.builtin

Toggle to control displaying ‘ok’ task/host results in a task

Choices:

  • no

  • yes ← (default)

Configuration:

  • INI entry:

    [defaults]
    display_ok_hosts = yes
    
  • Environment variable: ANSIBLE_DISPLAY_OK_HOSTS

display_skipped_hosts

boolean

Toggle to control displaying skipped task/host results in a task

Choices:

  • no

  • yes ← (default)

Configuration:

  • INI entry:

    [defaults]
    display_skipped_hosts = yes
    
  • Environment variable: DISPLAY_SKIPPED_HOSTS

    Removed in: version 2.12

    Why: environment variables without ANSIBLE_ prefix are deprecated

    Alternative: the ANSIBLE_DISPLAY_SKIPPED_HOSTS environment variable

  • Environment variable: ANSIBLE_DISPLAY_SKIPPED_HOSTS

pretty_results

boolean

added in 2.13 of ansible.builtin

Configure the result format to be more readable

When the result format is set to yaml this option defaults to True, and defaults to False when configured to json.

Setting this option to True will force json and yaml results to always be pretty printed regardless of verbosity.

When set to True and used with the yaml result format, this option will modify module responses in an attempt to produce a more human friendly output at the expense of correctness, and should not be relied upon to aid in writing variable manipulations or conditionals. For correctness, set this option to False or set the result format to json.

Choices:

  • no

  • yes

Configuration:

  • INI entry:

    [defaults]
    callback_format_pretty = None
    
  • Environment variable: ANSIBLE_CALLBACK_FORMAT_PRETTY

result_format

string

added in 2.13 of ansible.builtin

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:

  • json ← (default)

  • yaml

Configuration:

  • INI entry:

    [defaults]
    callback_result_format = json
    
  • Environment variable: ANSIBLE_CALLBACK_RESULT_FORMAT

show_custom_stats

boolean

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

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    show_custom_stats = no
    
  • Environment variable: ANSIBLE_SHOW_CUSTOM_STATS

show_per_host_start

boolean

added in 2.9 of ansible.builtin

This adds output that shows when a task is started to execute for each host

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    show_per_host_start = no
    
  • Environment variable: ANSIBLE_SHOW_PER_HOST_START

show_task_path_on_failure

boolean

added in 2.11 of ansible.builtin

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 -vv or greater verbosity.

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [defaults]
    show_task_path_on_failure = no
    
  • Environment variable: ANSIBLE_SHOW_TASK_PATH_ON_FAILURE

Hint

Configuration entries for each entry type 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.