From e750798e37a7044496bdb3d6a0559a7ff54985d5 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Fri, 7 Jul 2017 09:23:02 -0400 Subject: Only add entries to NO_PROXY settings if a NO_PROXY value is set Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1468424 Incorrect indentation caused base svc/cluster.local/hostname entries to be added to the NO_PROXY settings regardless of if the user was configuring NO_PROXY or not. --- roles/openshift_facts/library/openshift_facts.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index c960630ed..04b5dc86b 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1654,14 +1654,15 @@ def set_proxy_facts(facts): # in the _no_proxy value common['no_proxy'] = common['no_proxy'].split(",") - # at this point common['no_proxy'] is a LIST datastructure. It - # may be empty, or it may contain some hostnames or ranges. - - # We always add local dns domain, the service domain, and - # ourselves, no matter what - common['no_proxy'].append('.svc') - common['no_proxy'].append('.' + common['dns_domain']) - common['no_proxy'].append(common['hostname']) + # at this point common['no_proxy'] is a LIST datastructure. It + # may be empty, or it may contain some hostnames or ranges. + + # We always add local dns domain, the service domain, and + # ourselves, no matter what (if you are setting any + # NO_PROXY values) + common['no_proxy'].append('.svc') + common['no_proxy'].append('.' + common['dns_domain']) + common['no_proxy'].append(common['hostname']) # You are also setting system proxy vars, openshift_http_proxy/openshift_https_proxy if 'http_proxy' in common or 'https_proxy' in common: -- cgit v1.2.3