# Ansible v1.9 fails to get\_url when auth type is not basic (ntlm

**URL:** <https://forum.ansible.com/t/ansible-v1-9-fails-to-get-url-when-auth-type-is-not-basic-ntlm/19493>\
**Category:** Ansible Project\
**Created:** [October 12, 2015, 9:21pm UTC](https://forum.ansible.com/t/ansible-v1-9-fails-to-get-url-when-auth-type-is-not-basic-ntlm/19493 "2015-10-12T21:21:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Detert](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jon\_Detert](https://forum.ansible.com/u/Jon_Detert)\
**Post date:** [October 12, 2015, 9:21pm UTC](https://forum.ansible.com/t/ansible-v1-9-fails-to-get-url-when-auth-type-is-not-basic-ntlm/19493/1 "2015-10-12T21:21:03Z")

</div>

I want to download a file from Microsoft’s Visual Studio Team Foundation Server 2013 (aka TFS). I haven’t been able to do so via the get\_url module. I think the problem is that the TFS doesn’t support ‘basic’ authentication, and maybe only NTLM authentication, whereas get\_url doesn’t seem to know how to do NTLM auth.

I can download files from TFS using curl, but only if I use either the --ntlm or --anyauth arguments. If I use the --basic argument it fails.

I don’t see any way to specify the authentication mode when using the get\_url ansible module except to force the use of basic. Either way, get\_url fails with this error: “msg: Request failed”

Any ideas how I can download stuff from TFS with ansible other than the command module?

Thanks,

Jon

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [October 14, 2015, 5:10pm UTC](https://forum.ansible.com/t/ansible-v1-9-fails-to-get-url-when-auth-type-is-not-basic-ntlm/19493/2 "2015-10-14T17:10:16Z")

</div>

> From perusal of the code I believe that the command module is your

best bet at this point. Neither the get\_url nor the uri module  
support ntlm. The recipes I've found for enabling python code to use  
ntlm require the python-ntlm library. Since we don't want to require  
extra libraries to do basic things with ansible I'm not sure if that's  
appropriate for get\_url. Might be appropriate for uri (since it  
already requires httplib2) but httplib2 itself doesn't suppotr ntlm so  
I'm not sure if that would be an easy PR for someone to make or  
extremely hard.

-Toshio
