(1)在yum中多编辑一个文件
[ansible]
name = all source for ansible
baseurl = http://mirrors.aliyun.com/centos/7/os/x86_64
gpgcheck = 0
enable = 1

(2)安装有关python文件
yum install -y python-jinja2 python-cryptography python2-pyasn1 PyYAML


(3)执行下面这条命令时先要下载wget
yum install wget -y
wget http://mirrors.aliyun.com/repo/epel-7.repo

(4)接下来就可以下载ansible了
yum -y install ansible


网友评论