make parsed param private and explicit (#17104)

* make parsed param private and explicit

* fixed missed parsed
This commit is contained in:
Brian Coca 2016-08-16 11:59:30 -04:00 committed by GitHub
commit 5fe9d3c3d5
2 changed files with 4 additions and 3 deletions

View file

@ -670,9 +670,10 @@ class ActionBase(with_metaclass(ABCMeta, object)):
def _parse_returned_data(self, res):
try:
data = json.loads(self._filter_non_json_lines(res.get('stdout', u'')))
data['_ansible_parsed'] = True
except ValueError:
# not valid json, lets try to capture error
data = dict(failed=True, parsed=False)
data = dict(failed=True, _ansible_parsed=False)
data['msg'] = "MODULE FAILURE"
data['module_stdout'] = res.get('stdout', u'')
if 'stderr' in res: