summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-05-10 16:08:58 -0400
committerJason DeTiberus <detiber@gmail.com>2016-05-10 16:08:58 -0400
commit88806a06a55f4eb5eb82493087660834e228c389 (patch)
treecd243287e8b60bf04155efefa09de7a6e1adf26d /roles/openshift_facts
parent3f6b49eff445ef1fbd16c8d8a24cd7ce247dd528 (diff)
parent83f9edc249db6b629f6f6fdb19d1c363f70133eb (diff)
downloadopenshift-88806a06a55f4eb5eb82493087660834e228c389.tar.gz
openshift-88806a06a55f4eb5eb82493087660834e228c389.tar.bz2
openshift-88806a06a55f4eb5eb82493087660834e228c389.tar.xz
openshift-88806a06a55f4eb5eb82493087660834e228c389.zip
Merge pull request #1828 from sdodson/bz1330920
Fix openshift_generate_no_proxy_hosts boolean
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index bfd09676f..354c1cd37 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1374,18 +1374,19 @@ 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'], basestring):
+ common['no_proxy'] = common['no_proxy'].split(",")
+ elif 'no_proxy' not in common:
+ common['no_proxy'] = []
if 'generate_no_proxy_hosts' in common and \
- common['generate_no_proxy_hosts']:
- if 'no_proxy' in common and \
- isinstance(common['no_proxy'], basestring):
- common['no_proxy'] = common['no_proxy'].split(",")
- else:
- common['no_proxy'] = []
+ 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'])
+ # We always add ourselves no matter what
+ common['no_proxy'].append(common['hostname'])
+ common['no_proxy'] = sort_unique(common['no_proxy'])
facts['common'] = common
if 'builddefaults' in facts: