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:
Brian Coca 2015-10-02 14:33:02 -04:00
parent 86ef20c73b
commit e2ae3215f6
5 changed files with 16 additions and 13 deletions

View file

@ -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)