两种安装方式在生产环境的CentOS7系统中已验证通过,适用于内网离线或者外网在线安装,前提是系统自带或者干净的python环境。
cd /tmp
git clone https://github.com/ghl1024/ansible-offline-install.git
cd ansible-offline-install/ansible
sh install.sh
cd /tmp
wget -c https://github.com/ghl1024/ansible-offline-install/releases/download/V1/ansible-offline-install.tar.gz
tar xf ansible-offline-install.tar.gz
cd ansible
sh install.sh