yum install epel-release
yum -y install ansible
ansible --version
![图片[1]-Ansible安装与基础配置详细教程-不念博客](https://cdn.bunian.cn/wp-content/uploads/2023/01/image-111.png?imageMogr2/format/jpg/interlace/1)
开启记录日志
配置文件:/etc/ansible/ansible.cfg
# 去掉前面的'#'号
#log_path = /var/log/ansible.log ==> log_path = /var/log/ansible.log
去掉第一次连接ssh ask确认
# 第一种(推荐)
vi /etc/ansible/ansible.cfg
# 其实就是把#去掉
# host_key_checking = False ==> host_key_checking = False
# 第二种
vi /etc/ssh/ssh_config
StrictHostKeyChecking ask ==> StrictHostKeyChecking no
![图片[2]-Ansible安装与基础配置详细教程-不念博客](https://cdn.bunian.cn/wp-content/uploads/2023/01/image-112.png?imageMogr2/format/jpg/interlace/1)
© 版权声明
THE END
暂无评论内容