17 Jul 2018
使用awx远程通过ssh-key认证执行命令,发现每次执行都是ssh连接报错,错误信息如下
{ "msg": "('Bad authentication type', [u'publickey', u'gssapi-keyex', u'gssapi-with-mic']) (allowed_types=[u'publickey', u'gssapi-keyex', u'gssapi-with-mic'])", "unreachable": true, "changed": false }
思考过可能的问题原因:
结果通过以下方法逐个排除:
以上三个方面检查过后,终于怀疑到,可能和ansible的ssh连接类型有关(更多详细内容,可查看此文档)
然后通过给主机组增加以下变量解决
--- ansible_connection: ssh