Ansible2.9.6 Yum安装

1、首先先查看操作系统版本

Ansible2.9.6 Yum安装

 2、先进入到放置repo文件的目录

Ansible2.9.6 Yum安装

 3、下载并重命名repo文件

Ansible2.9.6 Yum安装

 4、清理缓存、更新yum源

Ansible2.9.6 Yum安装

 

 5、安装epel-release

Ansible2.9.6 Yum安装

 

 6、安装python

[root@app yum.repos.d]# yum install ansible –y

报错如下图所示

Ansible2.9.6 Yum安装

 

 7、将epel.repo文件放在别的文件夹下

Ansible2.9.6 Yum安装

 

 8、新建repo文件,内容如下:

 Ansible2.9.6 Yum安装

 

 9、再次清除缓存

Ansible2.9.6 Yum安装

 

 10、安装如下模块:

 [root@app yum.repos.d]# yum install -y python-jinja2 python-cryptography python2-pyasn1 PyYAML

Ansible2.9.6 Yum安装

 

 11、把base.repo放在别的文件夹下,把epel.repo移过来

Ansible2.9.6 Yum安装

 

 12、再次清除缓存

Ansible2.9.6 Yum安装

 

16、然后安装ansible

[root@app yum.repos.d]# yum install -y ansible

Ansible2.9.6 Yum安装

 

 至此,ansible安装完毕!!

Ansible2.9.6 Yum安装

 

上一篇:centos 7 minal版本 安装必备的工具


下一篇:centos7下自建yum源同步阿里源仓库-搭建篇1