Download artifacts from artifactory into server location

226 views
Skip to first unread message

Neha Singh

unread,
Nov 4, 2022, 3:33:20 AM11/4/22
to Ansible Project
Hi Team,

I was trying to download the maven artifact from required location (in artifactory) to server. But I a, getting some error for the same. Firstfall, please find my code below:

- hosts: 10.115.109.195
  gather_facts: yes

  tasks:
   - maven_artifact:
      group_id: commons-lang
      artifact_id: commons-lang
      version: 2.4
      repository_url: 'https://q1artifactory-dev.secintel.intranet.ibm.com/ext-release-local-zeus-gradle'
      username: XXXX
      password: XXXXX
      dest: /home


Below is the error I am getting while running the code:

fatal: [10.115.109.195]: FAILED! => {"changed": false, "msg": "Failed to download artifact commons-lang:commons-lang:2.4 because of Request failed: <urlopen error [Errno -5] No address associated with hostname>for URL https://q1artifactory-dev.secintel.intranet.ibm.com/ext-release-local-zeus-gradle/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"}

Meanwhile, I have also performed ssh to required host (10.115.109.195) and tried to ping the artifactory URL from there. I got the below response, maybe this URL is not able to resolved into that host. 

Do let me know what I can do to resolve this issue and download the artifact into a specified location in host.

Thanks & Regards
Neha Singh

Snehal Patel

unread,
Nov 4, 2022, 4:07:13 AM11/4/22
to ansible...@googlegroups.com
Have you checked if the URL is working or not? It seems that the server or URL is not working.

--
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/3eb6f711-6796-42e0-b8f5-ec12d58061e5n%40googlegroups.com.


--
Snehalkumar Patel
Lab Technician
K.D.P.Information Technology-CSPIT
Ext. No: 5356/5131

DISCLAIMER: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material which is the intellectual property of Charotar University of Science & Technology (CHARUSAT). Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is strictly prohibited. If you are not the intended recipient, or the employee, or agent responsible for delivering the message to the intended recipient and/or if you have received this in error, please contact the sender and delete the material from the computer or device. CHARUSAT does not take any liability or responsibility for any malicious codes/software and/or viruses/Trojan horses that may have been picked up during the transmission of this message. By opening and solely relying on the contents or part thereof this message, and taking action thereof, the recipient relieves the CHARUSAT of all the liabilities including any damages done to the recipient's pc/laptop/peripherals and other communication devices due to any reason.

Neha Singh

unread,
Nov 4, 2022, 5:19:01 AM11/4/22
to ansible...@googlegroups.com
Yes, the URL is working.

The URL which is mentioned in the error (https://q1artifactory-dev.secintel.intranet.ibm.com/ext-release-local-zeus-gradle/commons-lang/commons-lang/2.4/commons-lang-2.4.jar), when I tried to access the same, it tries to download the jar file. 
One more thing, this URL is specific to domain..I mean it cannot be accessed globally.

Please guide with the resolution here.

Thanks
Neha

Dick Visser

unread,
Nov 4, 2022, 5:48:03 AM11/4/22
to ansible...@googlegroups.com
The URL needs to be reachable from the host that you are deploying to.
Sounds like that host cannot resolve the domain name, so that task fails.
Either fix the DNS resolution on that host (recommended).
Or work around that by fetching the file first to the controller, and
then copying it to the node (not recommended).
What to choose depends on your situation.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJXXpjZo2EADWRAdg1kV2g2wUcv6g9ckq_ex-BCWaAvZeX_Ukg%40mail.gmail.com.

Snehal Patel

unread,
Nov 4, 2022, 6:37:10 AM11/4/22
to ansible...@googlegroups.com
I think you need to look into permissions or trusted domain name servers or the host. 

DNS.conf or Try without http or https Or (resolv.cfg remove. Before removing, copy it somewhere and create new dns.conf.) Or NetworkManager restart



Reply all
Reply to author
Forward
0 new messages