# Can i install ansible as a non root user?

**URL:** <https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119>\
**Category:** Ansible Project\
**Created:** [May 6, 2021, 1:04am UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119 "2021-05-06T01:04:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smahane](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Smahane](https://forum.ansible.com/u/Smahane)\
**Post date:** [May 6, 2021, 1:04am UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/1 "2021-05-06T01:04:25Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Komail\_Kanjee](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@Komail\_Kanjee](https://forum.ansible.com/u/Komail_Kanjee)\
**Post date:** [May 6, 2021, 1:25am UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/2 "2021-05-06T01:25:31Z")

</div>

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](https://pypi.org/project/ansible/#files)

Get the artifact to the target machine.

You can then do pip install --user \<path\_to\_tar.gz\>

---

<div class="post-metadata">

**Author:** ![Smahane](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Smahane](https://forum.ansible.com/u/Smahane)\
**Post date:** [May 11, 2021, 5:36pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/3 "2021-05-11T17:36:22Z")

</div>

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)**

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [May 11, 2021, 5:52pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/4 "2021-05-11T17:52:46Z")

</div>

You need to fetch all the dependencies

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [May 11, 2021, 8:27pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/5 "2021-05-11T20:27:44Z")

</div>

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](https://github.com/ownport/portable-ansible)

---

<div class="post-metadata">

**Author:** ![Smahane](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Smahane](https://forum.ansible.com/u/Smahane)\
**Post date:** [May 11, 2021, 9:10pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/6 "2021-05-11T21:10:39Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Komail\_Kanjee](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@Komail\_Kanjee](https://forum.ansible.com/u/Komail_Kanjee)\
**Post date:** [May 12, 2021, 12:16am UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/7 "2021-05-12T00:16:12Z")

</div>

See [https://pip.pypa.io/en/stable/cli/pip\_download/](https://pip.pypa.io/en/stable/cli/pip_download/)

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

---

<div class="post-metadata">

**Author:** ![Smahane](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Smahane](https://forum.ansible.com/u/Smahane)\
**Post date:** [May 12, 2021, 10:14pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/8 "2021-05-12T22:14:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 12, 2021, 10:23pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/9 "2021-05-12T22:23:33Z")

</div>

That comes with ansible-playbook does it not?

---

<div class="post-metadata">

**Author:** ![Smahane](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Smahane](https://forum.ansible.com/u/Smahane)\
**Post date:** [May 12, 2021, 11:22pm UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/10 "2021-05-12T23:22:23Z")

</div>

It’s not in the environment and not in /usr/bin/

If it’s installed, where would it be?

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 13, 2021, 6:17am UTC](https://forum.ansible.com/t/can-i-install-ansible-as-a-non-root-user/35119/11 "2021-05-13T06:17:54Z")

</div>

As soon as I used pip I just typed ansible-playbook and it’s there
