ansible.cfg configuration file




adding time of Task

https://docs.ansible.com/ansible/latest/plugins/callback/profile_tasks.html


ansible.cfg
ansible.cfg

/project # more ansible.cfg
[defaults]
ansible_python_interpreter=/usr/bin/python
deprecation_warnings=False
inventory=/project/hosts
host_key_checking = False
callback_whitelist = profile_tasks          <<<<<<<<<<  this one



Output with Time:


/project # ansible-playbook shutdown_ae1.yml

PLAY [Disable ae1] **************************************************************************************************************************

TASK [Deactivate bgp group eBGP] ************************************************************************************************************
Sunday 05 July 2020  09:36:58 +0000 (0:00:00.219)       0:00:00.219 ***********
ok: [172.30.95.177]

TASK [Print facts] **************************************************************************************************************************
Sunday 05 July 2020  09:37:01 +0000 (0:00:03.474)       0:00:03.693 ***********
ok: [172.30.95.177] => {
    "response": {
        "changed": false,
        "failed": false,
        "msg": "Configuration has been: opened, loaded, checked, diffed, closed."
    }
}

PLAY RECAP **********************************************************************************************************************************
172.30.95.177              : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Sunday 05 July 2020  09:37:02 +0000 (0:00:00.177)       0:00:03.871 ***********
===============================================================================
Deactivate bgp group eBGP ------------------------------------------------------------------------------------------------------------ 3.47s
Print facts -------------------------------------------------------------------------------------------------------------------------- 0.18s
/project #