Error when trying to install collection from ansible awx

Hi everyone,

I have to install some collections so I put it inside “collections/requirements.yml” but when I tried to synchronize my project I get errors with ansible galaxy URL

"[WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an",
    "unexpected error when getting available versions of collection",
    "community.general: Unknown error when attempting to call Galaxy at",
    "'https://galaxy.ansible.com/api/v3/collections/community/general/': <urlopen",
    "error [Errno -2] Name or service not known>. <urlopen error [Errno -2] Name or",
    "service not known>",
    "ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/v3/collections/community/general/': <urlopen error [Errno -2] Name or service not known>. <urlopen error [Errno -2] Name or service not known>"

can you share the requirements.yml ?

This is my requirements.yml:


collections:

Install a collection from Ansible Galaxy.

  • name: community.general

  • name: microsoft.ad

  • name: community.windows

  • name: community.vmware

  • name: fortinet.fortios

The error indicated a DNS failure when resolving galaxy.ansible.com:

Name or service not known

This could be any number of issues, but the end result is that DNS within your environment seems broken in some way.

@Dexrva whats the result when try to ping galaxy.ansible.com from the same machine you’re trying to install the collections in your requirements.yml?

I cannot ping from inside the pod, but I can perform a curl request to galaxy.ansible.com, and it works as expected:

Inside the Pod:

bash-5.1$ curl https://galaxy.ansible.com
Ansible Galaxy

<div id=“consent_blackbar” style="position: fixed; bottom: 0; width: 100%; z-index: 5; padding: 1

On the Linux Host:

[ii4ipat1@host ~]$ ping galaxy.ansible.com
PING galaxy.ansible.com (172.67.68.251) 56(84) bytes of data.
64 bytes from 172.67.68.251 (172.67.68.251): icmp_seq=1 ttl=55 time=56.3 ms
64 bytes from 172.67.68.251 (172.67.68.251): icmp_seq=2 ttl=55 time=56.2 ms
64 bytes from 172.67.68.251 (172.67.68.251): icmp_seq=3 ttl=55 time=56.2 ms
64 bytes from 172.67.68.251 (172.67.68.251): icmp_seq=4 ttl=55 time=56.2 ms

whats the default galaxy credential in your organization thats running the job template? usually it comes with a url