def configure_proxy(proxyname, start=True):
 changes_new = []
 changes_old = []
 status_file = True
 test = __opts__['test']
 proxyfile = '/etc/salt/proxy'
 (status_file, msg_new, msg_old) = _proxy_conf_file(proxyfile, test)
 changes_new.extend(msg_new)
 changes_old.extend(msg_old)
 status_proc = False
 if start:
  (status_proc, msg_new, msg_old) = _proxy_process(proxyname, test)
  changes_old.extend(msg_old)
  changes_new.extend(msg_new)
 else:
  changes_old.append('Start is False, not starting salt-proxy process')
  log.debug('Process not started')
 return {'result': (status_file and status_proc), 'changes': {'old': '\n'.join(changes_old), 'new': '\n'.join(changes_new)}}

def configure_proxy ( proxyname , start = True ) : changes_new = [ ] changes_old = [ ] status_file = True test = __opts__ [ 'test' ] proxyfile = '/etc/salt/proxy' ( status_file , msg_new , msg_old ) = _proxy_conf_file ( proxyfile , test ) changes_new . extend ( msg_new ) changes_old . extend ( msg_old ) status_proc = False if start : ( status_proc , msg_new , msg_old ) = _proxy_process ( proxyname , test ) changes_old . extend ( msg_old ) changes_new . extend ( msg_new ) else : changes_old . append ( 'Start is False, not starting salt-proxy process' ) log . debug ( 'Process not started' ) return { 'result' : ( status_file and status_proc ) , 'changes' : { 'old' : '\n' . join ( changes_old ) , 'new' : '\n' . join ( changes_new ) } }
create the salt proxy file and start the proxy process if required parameters: name: the name of this state proxyname: name to be used for this proxy start: boolean indicating if the process should be started example: .