Kubernetes/CICD/Ansible/Docs/Ansible编写与配置.md
offends 7a2f41e7d6
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-08-07 18:54:39 +08:00

20 lines
521 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

> 本文作者:丁辉
# Ansible编写与配置
- 第一步禁用SSH主机密钥检查
```bash
vi /etc/ansible/ansible.cfg
```
解除 `host_key_checking` 注释
```bash
[defaults]
host_key_checking = False
```
> 通常当你连接到一个新的SSH主机时SSH客户端会询问你是否要接受该主机的公钥。这个公钥将被保存到`known_hosts`文件中,以便将来的连接可以验证主机的身份。将`host_key_checking`设置为`False`会关闭这个验证步骤。