Changed the name of state_diff and fixed a bug

- Changed the name of the minion config variable state_diff to
  state_output_diff to make it more clear

- Fixed a bug where the output from changed states was not being showed
This commit is contained in:
Germán Jaber 2014-06-26 23:13:52 -04:30
parent b736451a7d
commit 0b16a0bdf6

View File

@ -110,13 +110,15 @@ def _format_host(host, data):
rcounts.setdefault(ret['result'], 0) rcounts.setdefault(ret['result'], 0)
rcounts[ret['result']] += 1 rcounts[ret['result']] += 1
# Skip this state if it was successfull & diff output was requested
if __opts__.get('state_diff', False) and ret['result']:
continue
tcolor = colors['GREEN'] tcolor = colors['GREEN']
schanged, ctext = _format_changes(ret['changes']) schanged, ctext = _format_changes(ret['changes'])
nchanges += 1 if schanged else 0 nchanges += 1 if schanged else 0
# Skip this state if it was successfull & diff output was requested
if __opts__.get('state_output_diff', False) and \
ret['result'] and not schanged:
continue
if schanged: if schanged:
tcolor = colors['CYAN'] tcolor = colors['CYAN']
if ret['result'] is False: if ret['result'] is False: