Unable to download the file using the get_url

44 views
Skip to first unread message

vkisha...@gmail.com

unread,
Aug 29, 2017, 5:48:11 AM8/29/17
to Ansible Project
I am using the below playbook

   - name: Downloading the file from URL
     get_url:
      url: "http://{{url_path_with_file_name}}"
      dest: /tmp/

Command i used is 
ansible-playbook  -vvvv test.ymal --extra-vars "url_path_with_file_name=examle.net/filename.tar"

Error :

    "mode": "0750", 
    "msg": "Request failed: <urlopen error [Errno -2] Name or service not known>", 
    "owner": "root", 
    "secontext": "unconfined_u:object_r:user_home_t:s0", 
    "size": 4096, 
    "state": "directory", 
    "uid": 0, 

But i am able to downlaod the same when i tried opening the file from chrome

Dick Visser

unread,
Aug 29, 2017, 7:46:15 AM8/29/17
to ansible...@googlegroups.com
Chrome runs on a different machine, and under a different user
account, than the machine you're targeting with the playbook (I hope).

Try signing in to the target host and see if you can "sudo wget
http://examle.net/filename.tar"

Dick
> --
> 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 post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f981c2d3-b359-4770-8851-958dac181e95%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Dick Visser
GÉANT

Want to join us? We're hiring: https://www.geant.org/jobs
Reply all
Reply to author
Forward
0 new messages