Set PROFILE_TASKS_TASK_OUTPUT_LIMIT

Currently it is set to 0 by default which results in a summary not
being printed at the end of the ansible playbook run. It would
greatly benefit operators if we printed out the top 50 time consuming
tasks at the end of the playbook run.

Change-Id: I140fe66091d4e7a710f04da15cc93b7e6bf5742c
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
This commit is contained in:
Sai Sindhur Malleni 2020-02-07 10:47:41 -05:00
parent 24e6ee25f8
commit ffff7887d4
2 changed files with 2 additions and 2 deletions

View File

@ -207,7 +207,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
self.trash_output = self._kwargs_for_run.pop('trash_output', False)
self.profile_tasks = self._kwargs_for_run.pop('profile_tasks', True)
self.profile_tasks_limit = self._kwargs_for_run.pop(
'profile_tasks_limit', 0)
'profile_tasks_limit', 20)
self.blacklisted_hostnames = self._kwargs_for_run.pop(
'blacklisted_hostnames', [])
self.override_ansible_cfg = self._kwargs_for_run.pop(

View File

@ -72,7 +72,7 @@ class AnsiblePlaybookActionTest(base.TestCase):
'ANSIBLE_LOCAL_TEMP': action.work_dir,
'ANSIBLE_CONFIG': ansible_config_path,
'ANSIBLE_CALLBACK_WHITELIST': 'profile_tasks',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '0',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '20',
}
python_version = sys.version_info.major
ansible_playbook_cmd = 'ansible-playbook-{}'.format(python_version)