def set_proxy_facts(facts):
 if ('common' in facts):
  common = facts['common']
  if (('http_proxy' in common) or ('https_proxy' in common)):
   if (('no_proxy' in common) and isinstance(common['no_proxy'], string_types)):
    common['no_proxy'] = common['no_proxy'].split(',')
   elif ('no_proxy' not in common):
    common['no_proxy'] = []
   if (('generate_no_proxy_hosts' in common) and safe_get_bool(common['generate_no_proxy_hosts'])):
    if ('no_proxy_internal_hostnames' in common):
     common['no_proxy'].extend(common['no_proxy_internal_hostnames'].split(','))
   common['no_proxy'].append(('.' + common['dns_domain']))
   common['no_proxy'].append(common['hostname'])
   common['no_proxy'] = sort_unique(common['no_proxy'])
  facts['common'] = common
 return facts

def set_proxy_facts ( facts ) : if ( 'common' in facts ) : common = facts [ 'common' ] if ( ( 'http_proxy' in common ) or ( 'https_proxy' in common ) ) : if ( ( 'no_proxy' in common ) and isinstance ( common [ 'no_proxy' ] , string_types ) ) : common [ 'no_proxy' ] = common [ 'no_proxy' ] . split ( ',' ) elif ( 'no_proxy' not in common ) : common [ 'no_proxy' ] = [ ] if ( ( 'generate_no_proxy_hosts' in common ) and safe_get_bool ( common [ 'generate_no_proxy_hosts' ] ) ) : if ( 'no_proxy_internal_hostnames' in common ) : common [ 'no_proxy' ] . extend ( common [ 'no_proxy_internal_hostnames' ] . split ( ',' ) ) common [ 'no_proxy' ] . append ( ( '.' + common [ 'dns_domain' ] ) ) common [ 'no_proxy' ] . append ( common [ 'hostname' ] ) common [ 'no_proxy' ] = sort_unique ( common [ 'no_proxy' ] ) facts [ 'common' ] = common return facts
set global proxy facts args: facts: existing facts returns: facts: updated facts with missing values .