Merge pull request #24183 from rallytime/bp-19320

Backport #19320 to 2015.5
This commit is contained in:
Justin Findlay 2015-05-27 23:14:36 -06:00
commit eb0af70e5b
2 changed files with 9 additions and 2 deletions

View file

@ -461,6 +461,10 @@
# states is cluttering the logs. Set it to True to ignore them.
#state_output_diff: False
# The state_output_profile setting changes whether profile information
# will be shown for each state run.
#state_output_profile: True
# Fingerprint of the master public key to double verify the master is valid,
# the master fingerprint can be found by running "salt-key -F master" on the
# salt master.

View file

@ -210,9 +210,12 @@ def _format_host(host, data):
u' {tcolor}Function: {comps[0]}.{comps[3]}{colors[ENDC]}',
u' {tcolor} Result: {ret[result]!s}{colors[ENDC]}',
u' {tcolor} Comment: {comment}{colors[ENDC]}',
u' {tcolor} Started: {ret[start_time]!s}{colors[ENDC]}',
u' {tcolor}Duration: {ret[duration]!s}{colors[ENDC]}'
]
if __opts__.get('state_output_profile', True):
state_lines.extend([
u' {tcolor} Started: {ret[start_time]!s}{colors[ENDC]}',
u' {tcolor}Duration: {ret[duration]!s}{colors[ENDC]}',
])
# This isn't the prettiest way of doing this, but it's readable.
if comps[1] != comps[2]:
state_lines.insert(