mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 11:47:47 +03:00
Use connection: local when delegate_to: localhost (#6322)
This will avoid SSH connection on the local host
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user