Use commas in no_proxy (#1782)
This commit is contained in:
parent
ef47a73382
commit
3ee91e15ff
1 changed files with 13 additions and 14 deletions
|
@ -164,20 +164,19 @@ vault_secrets_dir: "{{ vault_base_dir }}/secrets"
|
|||
|
||||
## Set no_proxy to all assigned cluster IPs and hostnames
|
||||
no_proxy: >-
|
||||
127.0.0.1
|
||||
localhost
|
||||
{% if loadbalancer_apiserver is defined %}
|
||||
{{ apiserver_loadbalancer_domain_name| default('') }}
|
||||
{{ loadbalancer_apiserver.address | default('') }}
|
||||
{% endif %}
|
||||
{% for item in (groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr']|default([]))|unique -%}
|
||||
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item]['ansible_default_ipv4']['address'])) }}
|
||||
{% if (item != hostvars[item]['ansible_hostname']) %} {{ hostvars[item]['ansible_hostname'] }}
|
||||
{{ hostvars[item]['ansible_hostname'] }}.{{ dns_domain }}
|
||||
{% endif %}
|
||||
{{ item }}
|
||||
{{ item }}.{{ dns_domain }}
|
||||
{% endfor %}
|
||||
{%- if loadbalancer_apiserver is defined -%}
|
||||
{{ apiserver_loadbalancer_domain_name| default('') }},
|
||||
{{ loadbalancer_apiserver.address | default('') }},
|
||||
{%- endif -%}
|
||||
{%- for item in (groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr']|default([]))|unique -%}
|
||||
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item]['ansible_default_ipv4']['address'])) }},
|
||||
{%- if (item != hostvars[item]['ansible_hostname']) -%}
|
||||
{{ hostvars[item]['ansible_hostname'] }},
|
||||
{{ hostvars[item]['ansible_hostname'] }}.{{ dns_domain }},
|
||||
{%- endif -%}
|
||||
{{ item }},{{ item }}.{{ dns_domain }},
|
||||
{%- endfor -%}
|
||||
127.0.0.1,localhost
|
||||
|
||||
proxy_env:
|
||||
http_proxy: "{{ http_proxy| default ('') }}"
|
||||
|
|
Loading…
Reference in a new issue