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

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

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