一、使用二进制包

https://github.com/ghl1024/ansible-offline-install/tree/main/ansible

基于系统自带的python2.7,不需要额外安装python3
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

二、使用yum包

https://github.com/NevermoreHere/centos-offline-install-ansible

基于系统自带的python2.7,不需要额外安装python3
可以先rpm -ivh安装ansible,缺少啥依赖安装啥