Don't output complex items in the summary line
When iterating over complex objects, printing them out in the task summary line is very noisy and hard to follow. Change-Id: I4ae748f167ee03ba97a4bcbf2417dae0271e24a5
This commit is contained in:
parent
c9f5675749
commit
a36b3b314c
|
@ -20,6 +20,13 @@
|
|||
- item2
|
||||
- item3
|
||||
|
||||
- name: Loop with complex items
|
||||
command: "echo {{ item.name }}"
|
||||
with_items:
|
||||
- name: complex1
|
||||
- name: complex2
|
||||
- name: complex3
|
||||
|
||||
- name: Run a shell task with an ansible python exception
|
||||
command: echo foo
|
||||
args:
|
||||
|
|
|
@ -428,10 +428,16 @@ class CallbackModule(default.CallbackModule):
|
|||
indent=2, sort_keys=True),
|
||||
status=status)
|
||||
else:
|
||||
self._log_message(
|
||||
result,
|
||||
"Item: {item} Runtime: {delta}"
|
||||
" Start: {start} End: {end}".format(**result_dict))
|
||||
if isinstance(result_dict['item'], str):
|
||||
self._log_message(
|
||||
result,
|
||||
"Item: {item} Runtime: {delta}"
|
||||
" Start: {start} End: {end}".format(**result_dict))
|
||||
else:
|
||||
self._log_message(
|
||||
result,
|
||||
"Item: Runtime: {delta} Start: {start} End: {end}".format(
|
||||
**result_dict))
|
||||
|
||||
if self._deferred_result:
|
||||
self._process_deferred(result)
|
||||
|
|
Loading…
Reference in New Issue