title: How do I install an Ansible Galaxy role from a tar.gz file?
body: <p>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 :</p>
  <blockquote>
  <p>dsglaser-cis_security-1.2.0.tar.gz</p>
  </blockquote>
  <p>Then I tried to install the role:</p>
  <pre><code>ansible-galaxy collection install dsglaser-cis_security-1.2.0.tar.gz
  </code></pre>
  <p>which gives me the warning :</p>
  <blockquote>
  <p>[WARNING]: - collection was NOT installed successfully: Failed to get data from the API server (<a href="https://galaxy.ansible.com/api/" rel="nofollow noreferrer">https://galaxy.ansible.com/api/</a>): Failed to connect to galaxy.ansible.com at port 443: [Errno 104] Connection reset by peer</p>
  </blockquote>
  <p>This is correct, because this machine is not, and never will be connected to the internet.</p>
  <p>Another attempt :</p>
  <pre><code>ansible-galaxy install dsglaser-cis_security-1.2.0.tar.gz
  </code></pre>
  <p>results in another warning:</p>
  <blockquote>
  <p>[WARNING]: - dsglaser-cis_security-1.2.0.tar.gz was NOT installed successfully: the specified roles path exists and is not a directory.</p>
  </blockquote>
  <p>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.</p>
  <p>I'm <strong>not</strong> doing this as root...
  Ansible version is 2.8.13</p>
  <p>Just discovered that the command</p>
  <pre><code>ansible-galaxy install dsglaser-cis_security-1.2.0.tar.gz -p ./bla
  </code></pre>
  <p>does work, but only as root. And that's not what I want...</p>
  <p>What am I doing wrong ?</p>