You might be interested in
https://github.com/ansible/ansible-modules-core/pull/153

On Sunday, November 23, 2014, Mirko Friedenhagen <[email protected]>
wrote:

> Hello,
>
> we provide user specific settings for our Maven repository via a HTTP
> GET request[1], but have the usecase that "anonymous" has read-only
> access, so authentication is not strictly enforced.
>
> I try to setup our CI system with ansible coming from a shell based
> setup, where I have:
>
> curl --netrc -o ~/.m2/settings.xml http://repo/path/settings.xml
>
> Now, curl sends the basic auth header in any case, while get_url[2]
> waits for a 401 to come back before offering credentials. So with
> get_url the credentials are not used but the settings.xml for
> anonymous are downloaded.
>
> I could implement a PR with an option to send authentication
> preemptively and default to the current behavior.
>
> On the other hand I think anyone using get_url with url_password knows
> that authentication is needed, so IMO sending the auth-header directly
> by default would be more useful and the current behavior only produces
> the overhead of additional requests.
>
>
>
> Regards Mirko
> [1] we use Artifactory templating here.
> [2] inspecting ansible/module_utils/urls.py
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
> https://bitbucket.org/mfriedenhagen/
>
> --
> 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 [email protected] <javascript:;>.
> To post to this group, send email to [email protected]
> <javascript:;>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAK8jvqxMrnvCVyY_piSxLZUM1%2BGEC3%3D%2BFERERSgBXZ5DVDhmPg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8w9PzDftGtD_gkqLtoNzqSJEUBWLuOvEy8xZsCz5PXkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to