如何捕获致命的无法访问的主机错误:
fatal: [x.x.x.x]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: xxxx@x.x.x.x.: Permission denied (publickey).", "unreachable": true}
似乎ignore_errors:是不起作用,“营救”也不会。
使用Ansible 2.8.3
答案 0 :(得分:0)
好,解决了:
ignore_unreachable: yes
https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html