diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-07-07 09:23:02 -0400 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-07-07 09:23:02 -0400 |
commit | e750798e37a7044496bdb3d6a0559a7ff54985d5 (patch) | |
tree | f65849637167a9ab9e0c5cbdb9a4dbf987e19f3c | |
parent | 5f49d32bb1c469639802a230c3f3364823a611ae (diff) | |
download | openshift-e750798e37a7044496bdb3d6a0559a7ff54985d5.tar.gz openshift-e750798e37a7044496bdb3d6a0559a7ff54985d5.tar.bz2 openshift-e750798e37a7044496bdb3d6a0559a7ff54985d5.tar.xz openshift-e750798e37a7044496bdb3d6a0559a7ff54985d5.zip |
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.
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 17 |
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 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: |