mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-18 09:27:34 -02:30
Use connection: local when delegate_to: localhost (#6322)
This will avoid SSH connection on the local host
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
mode: "0750"
|
||||
state: directory
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
become: no
|
||||
run_once: yes
|
||||
when: kubeconfig_localhost
|
||||
@@ -88,6 +89,7 @@
|
||||
dest: "{{ artifacts_dir }}/admin.conf"
|
||||
mode: 0640
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
become: no
|
||||
run_once: yes
|
||||
when: kubeconfig_localhost
|
||||
@@ -112,4 +114,5 @@
|
||||
become: no
|
||||
run_once: yes
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
when: kubectl_localhost and kubeconfig_localhost
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
stat:
|
||||
path: "{{ inventory_dir }}/../credentials"
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
register: old_credential_dir
|
||||
become: no
|
||||
|
||||
@@ -10,6 +11,7 @@
|
||||
stat:
|
||||
path: "{{ inventory_dir }}/credentials"
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
register: new_credential_dir
|
||||
become: no
|
||||
when: old_credential_dir.stat.exists
|
||||
@@ -19,6 +21,7 @@
|
||||
args:
|
||||
creates: "{{ inventory_dir }}/credentials"
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
become: no
|
||||
when:
|
||||
- old_credential_dir.stat.exists
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
delegate_to: localhost
|
||||
connection: local
|
||||
delegate_facts: yes
|
||||
run_once: yes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user