From a47b055ac71dccc3f9919276d24a3a93be12c243 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Fri, 19 Oct 2018 18:49:57 +0530 Subject: [PATCH] Update profile_tasks docs (#46690) Added configuration settings to enable profile_tasks via ansible.cfg Fixes: #44555 Signed-off-by: Abhijeet Kasurde --- lib/ansible/plugins/callback/profile_tasks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/callback/profile_tasks.py b/lib/ansible/plugins/callback/profile_tasks.py index dd6e45aae51..f8cec495bc5 100644 --- a/lib/ansible/plugins/callback/profile_tasks.py +++ b/lib/ansible/plugins/callback/profile_tasks.py @@ -22,7 +22,7 @@ DOCUMENTATION = ''' - It also lists the top/bottom time consuming tasks in the summary (configurable) - Before 2.4 only the environment variables were available for configuration. requirements: - - whitelisting in configuration + - whitelisting in configuration - see examples section below for details. options: output_limit: description: Number of tasks to display in the summary @@ -44,6 +44,11 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' +example: > + To enable, add this to your ansible.cfg file in the defaults block + [defaults] + callback_whitelist = 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 ********* @@ -52,7 +57,7 @@ EXAMPLES = ''' # TASK: [ensure db security group exists] *************************************** # Thursday 11 June 2017 22:50:54 +0100 (0:00:00.558) 0:00:05.880 ********* # changed: [localhost] -# ' +# ''' import collections