ansible 报错 "changed": false, "msg": "Failed to connect to the host
报错:
"changed": false,
"msg": "Failed to connect to the host via ssh: root@node1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
"unreachable": true}
“changed”: 假,
“msg”: “无法通过 ssh 连接到主机: root@node1: 权限被拒绝 (publickey,gssapi-keyex,gssapi-with-mic,password).”,
“unreachable”: 真
检查发现
配置文件中remote_user = root 写错了
由于我做的是hum用户,再通过hum提权来实现root权限 所以调整为
remote_user = hum