配置相关
10.10.10.5 | FAILED! => {
“msg”: “Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host’s fingerprint to your known_hosts file to manage this host.”
}
需要添加对应主机到信任清单。
解决方法:
使用ssh连接一次对应主机(会让你输入yes/no,输入yes)
设置参数为不检查key
1 | vi /etc/ansible/ansible.cfg |
[WARNING]: Platform linux on host -.-.-.- is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
在/etc/ansible/ansible.cfg
中的[default]
中添加
1 | interpreter_python=auto_legacy_silent |
ssh-copy-id出现以下错误Permission denied, please try again.
在目标主机的sshd_config
文件中开启允许root用户登录
1 | sshd_config |
roles相关
[ERROR]: failed to download the file:
[WARNING]: - geerlingguy.nginx was NOT installed successfully.
ERROR! - you can use –ignore-errors to skip failed roles and finish processing the list.
安装某些role时,出现
1 |