File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,13 +52,7 @@ class Pepper(object):
5252 logger .info ('Use Salt outputters' )
5353 for ret in json .loads (result )['return' ]:
5454 if isinstance (ret , dict ):
55- if 'data' in ret :
56- salt .output .display_output (
57- ret ['data' ],
58- self .cli .options .output or ret .get ('outputter' , 'nested' ),
59- opts = self .opts
60- )
61- else :
55+ if self .cli .options .client == 'local' :
6256 for minionid , minionret in ret .items ():
6357 if isinstance (minionret , dict ) and 'ret' in minionret :
6458 # version >= 2017.7
@@ -73,6 +67,18 @@ class Pepper(object):
7367 self .cli .options .output or self .output ,
7468 opts = self .opts
7569 )
70+ elif 'data' in ret :
71+ salt .output .display_output (
72+ ret ['data' ],
73+ self .cli .options .output or ret .get ('outputter' , 'nested' ),
74+ opts = self .opts
75+ )
76+ else :
77+ salt .output .display_output (
78+ {self .cli .options .client : ret },
79+ self .cli .options .output or ret .get ('outputter' , 'nested' ),
80+ opts = self .opts
81+ )
7682 else :
7783 salt .output .display_output (
7884 {self .cli .options .client : ret },
You can’t perform that action at this time.
0 commit comments