Ansible v1.9 fails to get_url when auth type is not basic (ntlm

233 views
Skip to first unread message

Jon Detert

unread,
Oct 13, 2015, 9:29:27 AM10/13/15
to Ansible Project
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

Toshio Kuratomi

unread,
Oct 14, 2015, 1:10:26 PM10/14/15
to ansible...@googlegroups.com
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
> --
> 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/c9d6251a-ea83-4c78-9251-4c3c3d603b8f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages