mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-18 01:17:38 -02:30
Use connection: local when delegate_to: localhost (#6322)
This will avoid SSH connection on the local host
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
{{ item }}: "{{ found.get('address', '127.0.0.1') }}"
|
||||
{% endfor %}
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
delegate_facts: yes
|
||||
become: no
|
||||
run_once: yes
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
gather_subset: '!all,network'
|
||||
filter: "ansible_default_ipv4"
|
||||
delegate_to: "{{ delegate_host_to_gather_facts }}"
|
||||
connection: "{{ (delegate_host_to_gather_facts == 'localhost') | ternary('local', omit) }}"
|
||||
delegate_facts: yes
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
{%- endif -%}
|
||||
127.0.0.1,localhost,{{ kube_service_addresses }},{{ kube_pods_subnet }}
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
delegate_facts: yes
|
||||
become: no
|
||||
run_once: yes
|
||||
|
||||
Reference in New Issue
Block a user