Merge pull request #2561 from rsmitty/no_proxy

only set no_proxy if other proxy vars are defined
This commit is contained in:
Andreas Krüger 2018-03-30 21:43:23 +02:00 committed by GitHub
commit 7ddd4cd38c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,6 +240,7 @@ weave_peers: uninitialized
## Set no_proxy to all assigned cluster IPs and hostnames ## Set no_proxy to all assigned cluster IPs and hostnames
no_proxy: >- no_proxy: >-
{%- if http_proxy is defined or https_proxy is defined %}
{%- if loadbalancer_apiserver is defined -%} {%- if loadbalancer_apiserver is defined -%}
{{ apiserver_loadbalancer_domain_name| default('') }}, {{ apiserver_loadbalancer_domain_name| default('') }},
{{ loadbalancer_apiserver.address | default('') }}, {{ loadbalancer_apiserver.address | default('') }},
@ -253,11 +254,12 @@ no_proxy: >-
{{ item }},{{ item }}.{{ dns_domain }}, {{ item }},{{ item }}.{{ dns_domain }},
{%- endfor -%} {%- endfor -%}
127.0.0.1,localhost 127.0.0.1,localhost
{%- endif %}
proxy_env: proxy_env:
http_proxy: "{{ http_proxy| default ('') }}" http_proxy: "{{ http_proxy| default ('') }}"
https_proxy: "{{ https_proxy| default ('') }}" https_proxy: "{{ https_proxy| default ('') }}"
no_proxy: "{{ no_proxy }}" no_proxy: "{{ no_proxy| default ('') }}"
# Vars for pointing to kubernetes api endpoints # Vars for pointing to kubernetes api endpoints
is_kube_master: "{{ inventory_hostname in groups['kube-master'] }}" is_kube_master: "{{ inventory_hostname in groups['kube-master'] }}"