skip to Main Content

we have rhel linux machine without network access

and we want to install ansible on that machine

but we want to install the ansible from binaries ( not like pip/yum install ) , because we want to avoid any pip dependencies issues

is any approach that is relevant ?

example of the legacy way

Step 1: Update your Control Node
Any time you are installing new software, it is a good idea to ensure your existing operating system software is up to date. Let’s start with that task first.

yum update

Step 2: Install the EPEL Repository
Installing Ansible is pretty straightforward. First, we’ll need to install the CentOS 7 EPEL repository.

yum install epel-release

Step 3: Install Ansible
Next, we install the Ansible package from the EPEL repository.

yum install ansible

2

Answers


  1. Perhaps not ideal, but you can just run from source. I’ve done it that way for years without any problems. I just put the initialization routine in my .bashrc file, so it’s always ready to use.
    Running Ansible from source (devel)

    Once you pull from git on a machine that has internet access, sneakernet it over to the machine you want it on.

    Login or Signup to reply.
  2. As mentioned in the official documentation you can use rpm available in official release repo. Since you dont have internet access you will have to download it somewhere else & copy it over to control node.

    RPMs for currently supported versions of RHEL, CentOS, and Fedora are available from EPEL as well as releases.ansible.com.
    

    Or

    You can also build an RPM yourself. From the root of a checkout or tarball, use the make rpm command to build an RPM you can distribute and install
    

    However I would not recommend Running Ansible from source (devel) because as already mentioned in the doc, this could be unstable.

    Note
    
    You should only run Ansible from devel if you are actively developing content for Ansible. This is a rapidly changing source of code and can become unstable at any point.
    

    If you would like to build rpm on your own, you should probably use the tagged releases.
    Available both in github & Ansible releases

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search