阿里云主机ssh 端口修改为了2222,ssh使用密码可以正常连接node,hosts.ini配置如下:
master ansible_connection=local ip=10.10.1.2 ansible_user=root ansible_port=2222
node1 ansible_host=10.10.1.3 ip=10.10.1.3 ansible_user=root ansible_port=2222 ansible_ssh_pass=xxx
node2 ansible_host=10.10.1.4 ip=10.10.1.4 ansible_user=root ansible_port=2222 ansible_ssh_pass=xxx
执行安装脚本提示ssh连接失败:
master : ok=4 changed=2 unreachable=0 failed=0
node1 : ok=0 changed=0 unreachable=1 failed=0
node2 : ok=0 changed=0 unreachable=1 failed=0
但在master主机上确认ssh -p2222 可以正常连接node,该问题是hosts.ini配置问题引起的吗?