一、下载官方安装包安装
1、下载安装包
下载地址:https://www.ansible.com/e2t/c/*W625VBD9dhBxwW4Gm-k568xdVX0/*W3rMjRB1xMdsvW4Hlzxj4MJ8fl0/5/f18dQhb0SbTP4fp0dhW1k8-g34N3V2KW3Lr6Z-5wLZhdMsd2JqXD6prW39DrXQ69Wl0XW7d0hL451fxMkW2HtVHT7nwMJHW51wVj66Qhr7rW69_sSB69M06XW3LwWyq6RkggcW4fNgBD30TNXPW2K884x7JHhDNW2MTPSp8W2c9WW32CQ2l8j22WZW8Tn65J1TxSXbW2lqN3m1x4lQBW6Hq46J5CkvrlW3h-jNG4r1Pm7W1nq9sh2jt165W3NnV4F1nJpwvW26pdfj35y0TxW4vvBd729sH6_W3NHBr11mh_lxV8BtRm67jfCCW4YGVlM67k4yVVf_nPl5xTz3cW3JzrFk3g88TmN37L1hZTqplKW3kByRX37V14ZN4T-2r9f6fNQV8bH7b6S_ZkdN22ZlRG9RgzvW5vptBK7q7-QcW6jtmts45Ly2MVkwRPg8mC-dCW7x6zGB4j7-nxW7B5g461gzy3BW7gYswV8_dvsVW140ZKx8KmJ68W42fkD67ZdkpXW4PNd2b9dbDRwW3bGkNX73Q0vRV1-Fyj5GnHrL102
如果不行,去www.ansible.com 官网查看下载下。在product分类里面

2、使用xftp上传

3、解压压缩包
tar -zxvf ansible-tower-setup-latest.tar.gz

4、进入解压后的文件夹
cd ansible-tower-setup-3.4.3-1/

5、安装ansible
./setup.sh

6、安装完毕后,配置文件在/etc/ansible/内

二、yum安装
1、配置阿里云yum仓库
备份原repo文件:cp /etc/yum.repos.d/CentOS-Base.repo{,.bak}
下载阿里云镜像文件:wget http://mirrors.aliyun.com/repo/Centos-7.repo
移动镜像文件:mv Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
2、yum安装ansible
运行命令:yum clean all && yum install ansible -y