# How do i install an ansible galaxy role from a tar.gz file as non-root user ?

**URL:** <https://forum.ansible.com/t/how-do-i-install-an-ansible-galaxy-role-from-a-tar-gz-file-as-non-root-user/33621>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [August 15, 2020, 12:56pm UTC](https://forum.ansible.com/t/how-do-i-install-an-ansible-galaxy-role-from-a-tar-gz-file-as-non-root-user/33621 "2020-08-15T12:56:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Lammerts](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@Hans\_Lammerts](https://forum.ansible.com/u/Hans_Lammerts)\
**Post date:** [August 15, 2020, 12:56pm UTC](https://forum.ansible.com/t/how-do-i-install-an-ansible-galaxy-role-from-a-tar-gz-file-as-non-root-user/33621/1 "2020-08-15T12:56:10Z")

</div>

Hi,

I have seen a number of sites that explain how to install a role from a tar.gz file using ansible-galaxy, and they all seem to say the same thing.  
In my case I have downloaded the following role file from ansible galaxy :  
**dsglaser-cis\_security-1.2.0.tar.gz**

Then I tried to install

`  
ansible-galaxy collection install dsglaser-cis\_security-1.2.0.tar.gz

`

which gives me the warning :

[WARNING]: - collection was NOT installed successfully: Failed to get data from the API server ([https://galaxy.ansible.com/api/](https://galaxy.ansible.com/api/)): Failed to connect to [galaxy.ansible.com](http://galaxy.ansible.com) at port 443: [Errno 104] Connection reset by peer

This is correct, because this machine is not, and never will be connected to the internet.

Another attempt :

`ansible-galaxy install dsglaser-cis_security-1.2.0.tar.gz`

results in another warning:  
[WARNING]: - dsglaser-cis\_security-1.2.0.tar.gz was NOT installed successfully: the specified roles path exists and is not a directory.

Also tried using the -p option to indicate where I want the role to be installed, with and without the directory present, but every attempt resulted in the last warning.

I’m **not** doing this as root…  
Ansible version is 2.8.13

Just discovered that the command

`ansible-galaxy install dsglaser-cis_security-1.2.0.tar.gz -p ./bla`

does work, but only as root. And that’s not what I want…

What am I doing wrong ?

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [August 17, 2020, 7:25am UTC](https://forum.ansible.com/t/how-do-i-install-an-ansible-galaxy-role-from-a-tar-gz-file-as-non-root-user/33621/2 "2020-08-17T07:25:11Z")

</div>

It's very strange, maybe ./bla directory is root owned?

You should be able to run this command without being root.

Luca
