Fix line-spacing in no_proxy.yml (#6810)

Signed-off-by: holmesb <5072156+holmesb@users.noreply.github.com>
This commit is contained in:
holmesb 2020-10-11 16:50:47 +01:00 committed by GitHub
parent cb57c3c916
commit 4cb5a4f609
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,38 @@
--- ---
- name: Set no_proxy to all assigned cluster IPs and hostnames - name: Set no_proxy to all assigned cluster IPs and hostnames
set_fact: set_fact:
no_proxy_prepare: >- no_proxy_prepare: >-
{%- 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('') }},
{%- endif -%} {%- endif -%}
{%- if ( (no_proxy_exclude_workers is defined) and (no_proxy_exclude_workers) ) -%} {%- if ( (no_proxy_exclude_workers is defined) and (no_proxy_exclude_workers) ) -%}
{% set cluster_or_master = 'kube-master' %} {% set cluster_or_master = 'kube-master' %}
{% else %} {% else %}
{% set cluster_or_master = 'k8s-cluster' %} {% set cluster_or_master = 'k8s-cluster' %}
{% endif %} {% endif %}
{%- for item in (groups[cluster_or_master] + groups['etcd'] + groups['calico-rr']|default([]))|unique -%} {%- for item in (groups[cluster_or_master] + groups['etcd'] + groups['calico-rr']|default([]))|unique -%}
{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(fallback_ips[item])) }}, {{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(fallback_ips[item])) }},
{%- if item != hostvars[item].get('ansible_hostname', '') -%} {%- if item != hostvars[item].get('ansible_hostname', '') -%}
{{ hostvars[item]['ansible_hostname'] }}, {{ hostvars[item]['ansible_hostname'] }},
{{ hostvars[item]['ansible_hostname'] }}.{{ dns_domain }}, {{ hostvars[item]['ansible_hostname'] }}.{{ dns_domain }},
{%- endif -%} {%- endif -%}
{{ item }},{{ item }}.{{ dns_domain }}, {{ item }},{{ item }}.{{ dns_domain }},
{%- endfor -%} {%- endfor -%}
{%- if additional_no_proxy is defined -%} {%- if additional_no_proxy is defined -%}
{{ additional_no_proxy }}, {{ additional_no_proxy }},
{%- endif -%} {%- endif -%}
127.0.0.1,localhost,{{ kube_service_addresses }},{{ kube_pods_subnet }} 127.0.0.1,localhost,{{ kube_service_addresses }},{{ kube_pods_subnet }}
delegate_to: localhost delegate_to: localhost
connection: local connection: local
delegate_facts: yes delegate_facts: yes
become: no become: no
run_once: yes run_once: yes
- name: Populates no_proxy to all hosts - name: Populates no_proxy to all hosts
set_fact: set_fact:
no_proxy: "{{ hostvars.localhost.no_proxy_prepare }}" no_proxy: "{{ hostvars.localhost.no_proxy_prepare }}"
proxy_env: "{{ proxy_env | combine({ proxy_env: "{{ proxy_env | combine({
'no_proxy': hostvars.localhost.no_proxy_prepare, 'no_proxy': hostvars.localhost.no_proxy_prepare,
'NO_PROXY': hostvars.localhost.no_proxy_prepare 'NO_PROXY': hostvars.localhost.no_proxy_prepare
}) }}" }) }}"