mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 19:50:25 -07:00
corrected no_log for items and skipped tasks
corrected output from default callback added new tests for no_log loops updated makefile test to check for both positive and negative occurrences of no_log
This commit is contained in:
parent
86ef20c73b
commit
e2ae3215f6
5 changed files with 16 additions and 13 deletions
|
@ -108,15 +108,14 @@ class CallbackBase:
|
|||
ret.append(">> the files are different, but the diff library cannot compare unicode strings\n\n")
|
||||
|
||||
def _get_item(self, result):
|
||||
if '_ansible_no_log' in result:
|
||||
if '_ansible_no_log' in result and result['_ansible_no_log']:
|
||||
item = "(censored due to no_log)"
|
||||
else:
|
||||
item = getattr(result, 'item', "(censored due to no_log)")
|
||||
item = result['item']
|
||||
|
||||
return item
|
||||
|
||||
def _process_items(self, result):
|
||||
|
||||
for res in result._result['results']:
|
||||
newres = deepcopy(result)
|
||||
res['item'] = self._get_item(res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue