Can i install ansible as a non root user?

904 views
Skip to first unread message

Smahane

unread,
May 5, 2021, 9:04:25 PM5/5/21
to Ansible Project
Hello everyone,

I have access to run on a cluster without root access. This cluster doesn't have access to the public network (no git, wget, curl...)

 Can i install ansible on it?

Thank you!

Komail Kanjee

unread,
May 5, 2021, 9:26:13 PM5/5/21
to ansible...@googlegroups.com
Do you have access to at least copy artifacts to this machine or is it completely off the grid?

You can install Ansible if you can get the Artifacts to that machine.

Download the artifacts from PyPI: https://pypi.org/project/ansible/#files

Get the artifact to the target machine.

You can then do pip install --user <path_to_tar.gz>

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9e97a0e8-f3fb-490a-9a27-cc418faedf82n%40googlegroups.com.

Smahane

unread,
May 11, 2021, 1:36:22 PM5/11/21
to Ansible Project
Hello,

I was able to copy the artifacts but i got an error during the installation. Any idea what it meant please?

Thank you,


$ pip3 install --user ansible-3.3.0.tar.gz
Processing ./ansible-3.3.0.tar.gz
Collecting ansible-base<2.11,>=2.10.8 (from ansible==3.3.0)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x147120631c88>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/ansible-base/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x147120631f28>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/ansible-base/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x147120631ba8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/ansible-base/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x147120631518>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/ansible-base/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1471205caf28>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/ansible-base/
  Could not find a version that satisfies the requirement ansible-base<2.11,>=2.10.8 (from ansible==3.3.0) (from versions: )
No matching distribution found for ansible-base<2.11,>=2.10.8 (from ansible==3.3.0)

Dick Visser

unread,
May 11, 2021, 1:53:12 PM5/11/21
to ansible...@googlegroups.com
You need to fetch all the dependencies 

--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Roberto Paz

unread,
May 11, 2021, 4:27:44 PM5/11/21
to Ansible Project
There are some non-oficial ansible portable distributions. I used these in very specific scenarios and I found them useful.

This is the one I used a few times: https://github.com/ownport/portable-ansible

Smahane

unread,
May 11, 2021, 5:10:39 PM5/11/21
to Ansible Project
Can i fetch all the dependencies on a machine with internet access , and copy them to the machine for installation? 

If so, how please?

Thank you,

Komail Kanjee

unread,
May 11, 2021, 8:16:50 PM5/11/21
to ansible...@googlegroups.com

Use the --dest to place all the downloaded files into a specific directory.

Smahane

unread,
May 12, 2021, 6:14:57 PM5/12/21
to Ansible Project
I followed the instructions and it only installed ansible-base-2.1-.9
How can i get ansible-playbook please?

Thank you,


$ pip3 install ansible-3.3.0.tar.gz --no-index --find-links=dependencies --user
Processing ./ansible-3.3.0.tar.gz
Collecting ansible-base<2.11,>=2.10.8 (from ansible==3.3.0)
Requirement already satisfied: jinja2 in /usr/lib/python3.6/site-packages (from ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: PyYAML in /usr/lib64/python3.6/site-packages (from ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: cryptography in /usr/lib64/python3.6/site-packages (from ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: packaging in /usr/lib/python3.6/site-packages (from ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib64/python3.6/site-packages (from jinja2->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: idna>=2.1 in /usr/lib/python3.6/site-packages (from cryptography->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python3.6/site-packages (from cryptography->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3.6/site-packages (from cryptography->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /usr/lib64/python3.6/site-packages (from cryptography->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: pyparsing in /usr/lib/python3.6/site-packages (from packaging->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Requirement already satisfied: pycparser in /usr/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.7->cryptography->ansible-base<2.11,>=2.10.8->ansible==3.3.0)
Installing collected packages: ansible-base, ansible
  Running setup.py install for ansible-base ... done
  Running setup.py install for ansible ... done
Successfully installed ansible-3.3.0 ansible-base-2.10.9

Wei-Yen Tan

unread,
May 12, 2021, 6:23:52 PM5/12/21
to ansible...@googlegroups.com
That comes with ansible-playbook does it not? 


From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Smahane <smahane...@gmail.com>
Sent: Thursday, May 13, 2021 10:14:57 AM
To: Ansible Project <ansible...@googlegroups.com>
Subject: Re: [ansible-project] Can i install ansible as a non root user?
 

Smahane

unread,
May 12, 2021, 7:22:24 PM5/12/21
to Ansible Project
It's not in the environment and not in /usr/bin/

If it's installed, where would it be?

Wei-Yen Tan

unread,
May 13, 2021, 2:18:14 AM5/13/21
to ansible...@googlegroups.com
As soon as I used pip I just typed ansible-playbook and it's there 


Sent: Thursday, May 13, 2021 11:22:23 AM
Reply all
Reply to author
Forward
0 new messages