How to configure Ansible without internet.

Dear Team,

We are going to configure automation tool i.e. ANSIBLE on production server. for that, I have install SLES12 SP2 operating system. Also, We have configure SMT server. I am not able to search " ansible " package into local repository.

How can I install ansible on production server without using internet ?

Regards,
Rajesh Kathar

[QUOTE=katharrajesh;38944]Dear Team,

We are going to configure automation tool i.e. ANSIBLE on production server. for that, I have install SLES12 SP2 operating system. Also, We have configure SMT server. I am not able to search " ansible " package into local repository.

How can I install ansible on production server without using internet ?

Regards,
Rajesh Kathar[/QUOTE]
Hi and welcome to the Forum :slight_smile:
Ansible is not part of SLE, you would need to either download a prebuilt rpm, build a version on OBS (https://build.opensuse.org/) or build from source.

There are some builds on OBS, but none for SLE 12 SP2.
https://software.opensuse.org/package/ansible

In all cases you would need to get it onto a storage device and manually install… (zypper in <some_rpm>) it should then pull in any dependiences from the SMT server.

Install from official SUSE Repositories on your central Ansible Host:

  • python-PyYAML
  • python-Jinja2
  • python-paramiko
  • python-httplib2

The central Ansible Host must be able to connect to your SUSE servers (SSH, non-root user, sudo rule for the non-root user on each SUSE server)

Using a server with internet access (e.g. a private laptop), pull Ansible from GIT, build a Tar and move the TAR
to your central (SUSE) Ansible Host. There is no need to install Ansible on every SUSE server. Ansible is agent-less:

$ git clone https://github.com/ansible/ansible.git --recursive
$ git checkout tags/v2.2.1.0-1
$ git submodule update --init
$ mv ansible/ ansible.v2.2.1.0-1
$ tar --exclude=.git\* -cvf ansible.v2.2.1.0-1.tar ansible.v2.2.1.0-1

You may also consider:
https://github.com/trondhindenes/flansible.git
https://github.com/dmsimard/ara
http://rundeck.org/

Dear Team,

Can I install Ansible using tar file [ compile base ] ? If yes, Can you provide me tar file and steps to install it. Still, I am not getting any SLES tutorial on google:confused:. Please help.

Regards,
Rajesh kathar

On 22/08/17 05:04, katharrajesh wrote:
[color=blue]

Can I install Ansible using tar file [ compile base ] ? If yes, Can you
provide me tar file and steps to install it. Still, I am not getting any
SLES tutorial on google:confused:. Please help.[/color]

Yes you can download and install Ansible from source (Phonthip even gave
you the steps) but version 2.1 is available to install via the SUSE
Package Hub - see https://packagehub.suse.com/packages/ansible/

If the SUSE Package Hub extension is not already enabled on your server
you can enable it (provided your server is registered with the SUSE
Customer Center) by entering “SUSEConnect -p PackageHub/12.2/x86_64”.
After that you should then simply be able to “zypper in ansible”.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.