版本号2.7;适用于centos7.3及其以上的环境
离线安装ansible
把安装包放到/data目录并解压
tar xvf ansible_packages.tar.gz
rpm -ivh deltarpm-3.6-3.el7.x86_64.rpm
rpm -ivh python-deltarpm-3.6-3.el7.x86_64.rpm
rpm -ivh createrepo-0.9.9-28.el7.noarch.rpm
制作离线源
createrepo /data/one-deploy/offlineData
新增yum文件/etc/yum.repos.d/ansible.repo
[ansible]
name=ansible
baseurl=file:///data/one-deploy/offlineData
gpgcheck=0
enabled=1
测试安装ansible
yum install ansible -y
1