yum install epel-releaseyum -y install ansibleansible --versionyum install epel-release yum -y install ansible ansible --versionyum install epel-release yum -y install ansible ansible --version
![Ansible安装与基础配置详细教程 图片[1]-Ansible安装与基础配置详细教程-不念博客](https://www.bunian.cn/wp-content/uploads/2023/01/image-111.png)
开启记录日志
配置文件:/etc/ansible/ansible.cfg
# 去掉前面的'#'号#log_path = /var/log/ansible.log ==> log_path = /var/log/ansible.log# 去掉前面的'#'号 #log_path = /var/log/ansible.log ==> log_path = /var/log/ansible.log# 去掉前面的'#'号 #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_configStrictHostKeyChecking ask ==> StrictHostKeyChecking no# 第一种(推荐) vi /etc/ansible/ansible.cfg # 其实就是把#去掉 # host_key_checking = False ==> host_key_checking = False # 第二种 vi /etc/ssh/ssh_config StrictHostKeyChecking ask ==> StrictHostKeyChecking no# 第一种(推荐) vi /etc/ansible/ansible.cfg # 其实就是把#去掉 # host_key_checking = False ==> host_key_checking = False # 第二种 vi /etc/ssh/ssh_config StrictHostKeyChecking ask ==> StrictHostKeyChecking no
![Ansible安装与基础配置详细教程 图片[2]-Ansible安装与基础配置详细教程-不念博客](https://www.bunian.cn/wp-content/uploads/2023/01/image-112.png)
© 版权声明
本站文章由不念博客原创,未经允许严禁转载!
THE END