[WARNING]: - linux-system-roles.network was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [Errno 101] Network is unreachable>

128 views
Skip to first unread message

ursa Brown

unread,
Feb 1, 2021, 11:19:37 AM2/1/21
to Ansible Project
How can I make ansible-galaxy work if it is not connected to internet?
Thank you

 ansible-galaxy role install linux-system-roles.network

[WARNING]: - linux-system-roles. network was NOT installed successfully: Unknown error when attempting to call
Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [Errno 101] Network is unreachable>

Jorge Rúa

unread,
Feb 1, 2021, 11:34:11 AM2/1/21
to ansible...@googlegroups.com
If you don't have access to the internet, then you'll have to mirror the required content into your network somehow.


You can also consider running an Pulp instance to server ansible content too: https://github.com/pulp/pulp_ansible

HTH,


--
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/6fd88401-14eb-4dfe-abbb-c38707754aban%40googlegroups.com.

ursa Brown

unread,
Feb 1, 2021, 3:14:09 PM2/1/21
to Ansible Project
there should be a offline flag..

jbor...@gmail.com

unread,
Feb 1, 2021, 5:34:17 PM2/1/21
to Ansible Project
How do you expect to download a role from the internet if you don't have access to the internet in the first place. An offline flag would only work if you've already downloaded the roles and placed it somewhere, if that's the case then just copy it into the roles directory like normal roles.

You can also do as the previous commenter said and mirror the content to a local repository and target that server when installing roles.

ursa Brown

unread,
Feb 1, 2021, 9:33:24 PM2/1/21
to Ansible Project

So the yum install linux-system-roles wont fix this?

ursa Brown

unread,
Feb 1, 2021, 9:35:13 PM2/1/21
to Ansible Project
Do you mind showing me the step on how to do it offline?
Thank you

On Monday, February 1, 2021 at 4:34:17 PM UTC-6 jbor...@gmail.com wrote:

ursa Brown

unread,
Feb 2, 2021, 9:11:39 AM2/2/21
to Ansible Project
when you say mirror? like this?

1. cp -r /usr/share/ansible/roles/rhel-system-roles.network   /home/ansible/roles/

Jorge Rúa

unread,
Feb 2, 2021, 9:43:05 AM2/2/21
to ansible...@googlegroups.com
By mirror I mean cloning, downloading content from ansible-galaxy and placing it into a server in your network. 
This server can then expose the very same content via http/s, git protocols.
So you'll need to come up with an strategy to fetch content upstream to your network.
After you've built your catalog of ansible items internally, you could instruct ansible-galaxy to fetch it from your internal network instead.

This concept of air-gapped/disconnected networks applies for multiple approaches, like distributing RPMs, container images and so on.




Rich Megginson

unread,
Feb 2, 2021, 10:02:12 AM2/2/21
to ansible...@googlegroups.com
On 2/1/21 7:33 PM, ursa Brown wrote:

So the yum install linux-system-roles wont fix this?


Yes, you can use `yum install linux-system-roles` - what platform are you using for your Ansible controller node?  Fedora 32/33?


ursa Brown

unread,
Feb 2, 2021, 10:27:29 AM2/2/21
to Ansible Project
For start I only have a RHEL7 iso.

Rich Megginson

unread,
Feb 2, 2021, 10:59:04 AM2/2/21
to ansible...@googlegroups.com
On 2/2/21 8:27 AM, ursa Brown wrote:
For start I only have a RHEL7 iso.


In RHEL the package is called `rhel-system-roles`.


ursa Brown

unread,
Feb 2, 2021, 12:01:54 PM2/2/21
to Ansible Project
in rhel-system-roles package the geerlinguy or haproxy role is not there. How will I use a geerlinguy haproxy role?
Thanks

Rich Megginson

unread,
Feb 2, 2021, 12:15:26 PM2/2/21
to ansible...@googlegroups.com
On 2/2/21 10:01 AM, ursa Brown wrote:
in rhel-system-roles package the geerlinguy or haproxy role is not there. How will I use a geerlinguy haproxy role?


I don't know, but I'm curious as to why you thought the "geerlinguy haproxy" role was provided by the linux-system-roles or rhel-system-roles RPM package?


Dick Visser

unread,
Feb 2, 2021, 12:21:58 PM2/2/21
to ansible...@googlegroups.com
Hi

You seem to be circling around the fact that you don't have internet connectivity in your environment.
And the recommendations that were given by the previous posters didn't get any traction.
There are many ways to get content onto an air gapped system.
But this is entirely dependent on your environment.
If all else fails, just download the content on an internet connected host and copy it to your ansible host. Perhaps by USB stick, whatever works for you.
If you don't know how to do that, then ask someone who DOES know your environment  (your sysadmin or tech support or whatever).
 





--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages