def _run_cmd(cmd):
 ret = {}
 result = __salt__['cmd.run_all'](cmd)
 if result.get('stdout'):
  ret['stdout'] = result['stdout']
 if result.get('stderr'):
  ret['stderr'] = result['stderr']
 ret['success'] = (result['retcode'] == 0)
 return ret

def _run_cmd ( cmd ) : ret = { } result = __salt__ [ 'cmd.run_all' ] ( cmd ) if result . get ( 'stdout' ) : ret [ 'stdout' ] = result [ 'stdout' ] if result . get ( 'stderr' ) : ret [ 'stderr' ] = result [ 'stderr' ] ret [ 'success' ] = ( result [ 'retcode' ] == 0 ) return ret
run a kapacitor task and return a dictionary of info .