博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Ansible使用yum安装

Posted on 2021-01-06 20:54  红与黑hyh  阅读(506)  评论(0编辑  收藏  举报

Ansible安装

1)配置epel

[root@ansible ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
[root@ansible ~]# yum clean all
[root@ansible ~]# yum makecache

2)安装ansible

[root@ansible ~]# yum -y install ansible

 

3)安装完成,查看版本

[root@ansible ~]# ansible --version

 

4)集群ssh配置文件

vim /etc/ansible/hosts