Transcript from a quick chat on Freenode ansible's IRC channel:


[12:56] <Canta_> Any clue on how can i force the URI module output format?
[12:56] <agaffney> can you be more specific?
[12:57] <Canta_> Sure. I was saying a few minutes ago:
[12:57] <Canta_> I do a call to a login service, this service gives me a cookie, and then I use the cookie for the rest of the calls. How to do this is stated in the URI module's docs. [12:57] <Canta_> But with a server with ansible 2.3, the URI output object has the "set_cookie" property, and with ansible 2.4 it returns the "cookies" property. Even when both of them do the same request to the same server.
[12:58] <Canta_> So far, couldn't find how to config that. :(
[12:58] <agaffney> config what? which field is used to contain the cookies? the change between 2.3 and 2.4 was either purposeful or unintentional, but it's probably not configurable [13:01] <Canta_> @agaffney : yep, i would like to force the property for the cookies in the URI module output. [13:01] <Canta_> @agaffney : If it's not configurable, then i guess there's an error in the module's docs. [13:01] <agaffney> the docs don't even show 'set_cookie' or 'cookies' as a valid return param for the 'uri' module, but I do see an example of accessing .set_cookie from a registered var [13:02] <Canta_> @agaffney : yeah. And that code in the example worked so far, until v2.4. [13:05] <Canta_> @agaffney : Thing is, i've poked in the module's code, and couldn't find anything related to those properties, in any version (2.3 nor 2.4). [13:05] <Canta_> @agaffney : So is kinda a mistery to me where does it comes from. [13:05] <agaffney> the properties probably come from fetch_url() in module_utils.basics
[13:05] <agaffney> or thereabouts
[13:06] <Canta_> Hmmm... that's useful. I'll check its code and see if there's any significant change there. Thanks agaffney! :D [13:08] <agaffney> Canta_: https://github.com/ansible/ansible/commit/df8fde4d786e32ed7e8313d63e9a559d5f6137d3#diff-3448ba8582852f79eb0d697763e046d8 looks relevant [13:09] <agaffney> that's where 'cookies' was added, but I have no idea where 'set_cookie' came from previously or where it went to [13:10] <agaffney> actually, that commit message says that 'set_cookie' should still be there
[13:10] <agaffney> it's possible that it was removed in a later commit



So, I'm looking now for the origin of the "set_cookie" property. If it was deleted from the code, then the docs should be changed. Otherwise, there may be some other problem here.


--
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/20180516134018.Horde.NcHUQDXKnRJLDMwC6CHnCcc%40first.brohost.com.ar.
For more options, visit https://groups.google.com/d/optout.

Reply via email to