Ansible installation-Centos

My production server is running on Centos 7.7. I want to install ansible. But due to no internet connection available, I am facing issues while installing the rpms , there are so many dependencies, that literally approaching is quite impossible to proceed. Can anyone please help me how I can get all the rpms for the ansible installation?

It is not clear if you have no way of installing dependencies at all.
Or if you somehow can fetch them through some other way, and manually
install them.

On a machine with internet access

PKG=ansible # NAME OF THE PACKAGE TO INSTALL ON OFFLINE MACHINE

yum install --downloadonly --installroot=/tmp/$PKG-installroot --releasever=7 --downloaddir=/tmp/$PKG $PKG

createrepo --database /tmp/$PKG

rm -rf /tmp/$PKG-installroot

rsync -arv /tmp/$PKG/ [IP of the machine]:/tmp/$PKG

On the offline Machine

Use proxy for that or create one repository server for your server for installation.