|
|
@ -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 ('') }}" |
|
|
|