ansible.posix.profile_tasks – adds time information to tasks

Note

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

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 ansible.posix.

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

Synopsis

Requirements

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

  • whitelisting in configuration - see examples section below for details.

Parameters

Parameter

Comments

output_limit

string

Number of tasks to display in the summary

Default: 20

Configuration:

  • INI entry:

    [callback_profile_tasks]
    task_output_limit = 20
    
  • Environment variable: PROFILE_TASKS_TASK_OUTPUT_LIMIT

sort_order

string

Adjust the sorting output of summary tasks

Choices:

  • descending ← (default)

  • ascending

  • none

Configuration:

  • INI entry:

    [callback_profile_tasks]
    sort_order = descending
    
  • Environment variable: PROFILE_TASKS_SORT_ORDER

Examples

example: >
  To enable, add this to your ansible.cfg file in the defaults block
    [defaults]
    callback_whitelist = ansible.posix.profile_tasks
sample output: >
#
#    TASK: [ensure messaging security group exists] ********************************
#    Thursday 11 June 2017  22:50:53 +0100 (0:00:00.721)       0:00:05.322 *********
#    ok: [localhost]
#
#    TASK: [ensure db security group exists] ***************************************
#    Thursday 11 June 2017  22:50:54 +0100 (0:00:00.558)       0:00:05.880 *********
#    changed: [localhost]
#