Merge pull request #23710 from makinacorpus/i23709

Get more useful output from stateful commands
This commit is contained in:
Thomas S Hatch 2015-05-14 15:58:10 -06:00
commit d73984ec9c

View file

@ -229,11 +229,13 @@ def _reinterpreted_state(state):
key, val = item.split('=')
data[key] = val
except ValueError:
return _failout(
state = _failout(
state,
'Failed parsing script output! '
'Stdout must be JSON or a line of name=value pairs.'
)
state['changes'].update(ret)
return state
changed = _is_true(data.get('changed', 'no'))