mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Typecast results before use in profile_tasks callback (#26)
If user specifies sort_order to none, results are not converted to list. This fix force this typecasting before using the results. Fixes: https://github.com/ansible/ansible/issues/69563 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
d9e0140b66
commit
0062198f73
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ EXAMPLES = '''
|
||||||
example: >
|
example: >
|
||||||
To enable, add this to your ansible.cfg file in the defaults block
|
To enable, add this to your ansible.cfg file in the defaults block
|
||||||
[defaults]
|
[defaults]
|
||||||
callback_whitelist = profile_tasks
|
callback_whitelist = ansible.posix.profile_tasks
|
||||||
sample output: >
|
sample output: >
|
||||||
#
|
#
|
||||||
# TASK: [ensure messaging security group exists] ********************************
|
# TASK: [ensure messaging security group exists] ********************************
|
||||||
|
|
@ -183,7 +183,7 @@ class CallbackModule(CallbackBase):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Display the number of tasks specified or the default of 20
|
# Display the number of tasks specified or the default of 20
|
||||||
results = results[:self.task_output_limit]
|
results = list(results)[:self.task_output_limit]
|
||||||
|
|
||||||
# Print the timings
|
# Print the timings
|
||||||
for uuid, result in results:
|
for uuid, result in results:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue