def config(conf_path='/etc/rsyncd.conf'):
 ret = ''
 try:
  with salt.utils.fopen(conf_path, 'r') as fp_:
   for line in fp_:
    ret += line
 except IOError as exc:
  if (exc.errno == errno.ENOENT):
   raise CommandExecutionError('{0} does not exist'.format(conf_path))
  elif (exc.errno == errno.EACCES):
   raise CommandExecutionError('Unable to read {0}, access denied'.format(conf_path))
  elif (exc.errno == errno.EISDIR):
   raise CommandExecutionError('Unable to read {0}, path is a directory'.format(conf_path))
  else:
   raise CommandExecutionError('Error {0}: {1}'.format(exc.errno, exc.strerror))
 else:
  return ret

def config ( conf_path = '/etc/rsyncd.conf' ) : ret = '' try : with salt . utils . fopen ( conf_path , 'r' ) as fp_ : for line in fp_ : ret += line except IOError as exc : if ( exc . errno == errno . ENOENT ) : raise CommandExecutionError ( '{0} does not exist' . format ( conf_path ) ) elif ( exc . errno == errno . EACCES ) : raise CommandExecutionError ( 'Unable to read {0}, access denied' . format ( conf_path ) ) elif ( exc . errno == errno . EISDIR ) : raise CommandExecutionError ( 'Unable to read {0}, path is a directory' . format ( conf_path ) ) else : raise CommandExecutionError ( 'Error {0}: {1}' . format ( exc . errno , exc . strerror ) ) else : return ret
set traffic server configuration variable values .