fix(gpu-k8s): use inventory ssh user for precheck

This commit is contained in:
shenlan 2025-06-25 23:50:03 +08:00
parent 8081c9ae09
commit 3f107cd7d1

View File

@ -73,7 +73,9 @@
when: inventory_hostname == (ops_host | default(masters | default(master_ips) | first))
- name: Verify passwordless SSH access to all cluster nodes
shell: ssh -o BatchMode=yes -o StrictHostKeyChecking=no root@{{ item }} hostname
shell: >-
ssh -o BatchMode=yes -o StrictHostKeyChecking=no \
{{ 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) }}"
become: false