Merge pull request #23 from svc-design/codex/分析并修复ssh无密码登录错误
Fix GPU k8s SSH trust
This commit is contained in:
commit
e8bd1eefa4
@ -1,7 +1,9 @@
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
ops_host: "127.0.0.1"
|
||||
# Use the inventory hostname for delegation so Ansible
|
||||
# applies the correct connection variables
|
||||
ops_host: "ops-1"
|
||||
masters:
|
||||
- "k8s-1"
|
||||
nodes:
|
||||
|
||||
@ -75,6 +75,7 @@
|
||||
- name: Verify passwordless SSH access to all cluster nodes
|
||||
shell: >-
|
||||
ssh -o BatchMode=yes -o StrictHostKeyChecking=no \
|
||||
-i {{ ansible_ssh_private_key_file | default('~/.ssh/id_rsa') }} \
|
||||
{{ ansible_ssh_user | default(ansible_user, true) | default('root') }}@{{ item }} hostname
|
||||
loop: "{{ master_ips + node_ips }}"
|
||||
delegate_to: "{{ ops_host | default(masters | default(master_ips) | first) }}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user