UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed.", "unreachable": true}
--key-file
指定了pem文件,仍是沒成,發現/mnt/vdb/jenkins/.ssh/known_hosts
文件,因而我將連接後的known_hosts加入到此文件/mnt/vdb/jenkins/.ssh
目錄下,執行獲得錯誤二"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)."
查看 /mnt/vdb/jenkins/.ssh下的pem的權限和用戶組,發現是root,修改權限爲400,用戶組爲jenkins,再次執行成功api
初次接觸,調試了好久沒有成功,最後選擇了放棄,週末休息了兩天,週一繼續調試,終於發現問題的root case。
調試仍是要心平氣和,安靜第一ssh