> For the complete documentation index, see [llms.txt](https://close.gitbook.io/yun-wei-bi-ji/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://close.gitbook.io/yun-wei-bi-ji/centos/ansible/ansible-cuo-wu.md).

# Ansible 错误

#### ansible报错Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this

安装和配置好ansible，执行命令时报错如下

```python
[root@test01 ansible-install]# ansible test -m shell -a 'w'
10.xx.37.26 | FAILED | rc=-1 >>
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.
```

解决方法：

```bash
# vi /etc/ansible/ansible.cfg
[defaults]
forks          = 8           #执行时并发数
host_key_checking = False    #不检测host key
```
