Update profile_tasks.md
Converted to RST.
This commit is contained in:
parent
76ac6294e0
commit
9eca815377
1 changed files with 47 additions and 36 deletions
|
@ -1,42 +1,53 @@
|
||||||
# profile_tasks.py
|
profile\_tasks.py
|
||||||
|
=================
|
||||||
|
|
||||||
Ansible plugin for timing individual tasks and overall execution time.
|
Ansible plugin for timing individual tasks and overall execution time.
|
||||||
|
|
||||||
Mashup of 2 excellent original works:
|
Mashup of 2 excellent original works:
|
||||||
|
|
||||||
- (https://github.com/jlafon/ansible-profile)
|
- (https://github.com/jlafon/ansible-profile)
|
||||||
- (https://github.com/junaid18183/ansible_home/blob/master/ansible_plugins/callback_plugins/timestamp.py.old)
|
- (https://github.com/junaid18183/ansible_home/blob/master/ansible_plugins/callback_plugins/timestamp.py.old)
|
||||||
|
|
||||||
## Usage
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
Add `profile_taks` to the `callback_whitelist` in `ansible.cfg`.
|
Add ``profile_taks`` to the ``callback_whitelist`` in ``ansible.cfg``.
|
||||||
|
|
||||||
Run playbooks as normal.
|
Run playbooks as normal.
|
||||||
|
|
||||||
## Features
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
### Tasks
|
Tasks
|
||||||
|
~~~~~
|
||||||
|
|
||||||
Ongoing timing of each task as it happens.
|
Ongoing timing of each task as it happens.
|
||||||
|
|
||||||
Format:
|
| Format:
|
||||||
`<task start timestamp> (<length of previous task>) <current elapsed playbook execution time>`
|
| ``<task start timestamp> (<length of previous task>) <current elapsed playbook execution time>``
|
||||||
|
|
||||||
```shell
|
Task output example:
|
||||||
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] ***************************************
|
.. code:: shell
|
||||||
Thursday 11 June 2017 22:50:54 +0100 (0:00:00.558) 0:00:05.880 *********
|
|
||||||
changed: [localhost]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Play Recap
|
TASK: [ensure messaging security group exists] ********************************
|
||||||
|
Thursday 11 June 2017 22:50:53 +0100 (0:00:00.721) 0:00:05.322 *********
|
||||||
|
ok: [localhost]
|
||||||
|
|
||||||
Recap includes ending timestamp, total playbook execution time and a sorted list of the top longest running tasks.
|
TASK: [ensure db security group exists] ***************************************
|
||||||
|
Thursday 11 June 2017 22:50:54 +0100 (0:00:00.558) 0:00:05.880 *********
|
||||||
|
changed: [localhost]
|
||||||
|
|
||||||
|
Play Recap
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
Recap includes ending timestamp, total playbook execution time and a
|
||||||
|
sorted list of the top longest running tasks.
|
||||||
|
|
||||||
No more wondering how old the results in a terminal window are.
|
No more wondering how old the results in a terminal window are.
|
||||||
|
|
||||||
```shell
|
.. code:: shell
|
||||||
|
|
||||||
ansible <args here>
|
ansible <args here>
|
||||||
<normal output here>
|
<normal output here>
|
||||||
PLAY RECAP ********************************************************************
|
PLAY RECAP ********************************************************************
|
||||||
|
@ -51,8 +62,8 @@ No more wondering how old the results in a terminal window are.
|
||||||
serf | Install system dependencies----------------------------------------3.38s
|
serf | Install system dependencies----------------------------------------3.38s
|
||||||
duo_security | Install Duo Unix SSH Integration---------------------------3.37s
|
duo_security | Install Duo Unix SSH Integration---------------------------3.37s
|
||||||
loggly | Install TLS version----------------------------------------------3.36s
|
loggly | Install TLS version----------------------------------------------3.36s
|
||||||
```
|
|
||||||
|
|
||||||
## Compatibility
|
Compatibility
|
||||||
|
-------------
|
||||||
|
|
||||||
Ansible 2.0+
|
Ansible 2.0+
|
||||||
|
|
Loading…
Reference in a new issue