There's a status_code option you can send.

http://docs.ansible.com/uri_module.html



On Fri, Mar 21, 2014 at 10:55 AM, bryan hunt <[email protected]>wrote:

>
> I have this same issue when using it to create riak-cs admin users.
>
> riak-cs will return either 201 or 409 when sending a PUT request, never a
> 200.
>
> Unfortunately 201 triggers module failure, as 200 is what it expects.
>
> riak_cs | FAILED
>
> *....*"msg": "Status code was not 200",
>
> I can work around this, but it's going to be ugly.
>
>
>
>
> On Monday, October 7, 2013 12:07:36 PM UTC+1, Edgars wrote:
>
>> Hi
>>
>> Is it possible to define two status_codes? For instance I have webpage
>> which can return status code 200 or status code 301 and both are ok. How
>> can i tell uri module to accept both?
>>
>> thanks
>> Edgars
>>
>>
>> svētdiena, 2013. gada 17. februāris 00:50:27 UTC+1, Michael DeHaan
>> rakstīja:
>>>
>>> Romeo Theriault wrote an EXCELLENT module for interacting with web
>>> services, and I've pushed it, and the docs on it are now up on the
>>> docsite.
>>>
>>> It's called "uri".
>>>
>>> Unfortunately the examples kind of ate it when using our docsite
>>> module formatter (produced some weird markup), so there aren't a lot
>>> of examples online yet.
>>>
>>> You should try it out anyway.
>>>
>>> It can be used in combination with "fail" and "register" and "when"
>>> and the like to do really basic tests for web services, and it can
>>> even log into forms, use register to save a cookie, and then submit
>>> other requests.
>>>
>>> You can even use it submit JIRA tickets.
>>>
>>> (Actually what I am thinking is eventually we start including more
>>> examples in the examples directory, and the docsite can just link to
>>> them).
>>>
>>> Check it out!
>>>
>>> -Michael
>>>
>>  --
> 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/a8d39219-f0b3-4521-8b01-04bd2a4257c5%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/a8d39219-f0b3-4521-8b01-04bd2a4257c5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEVJ8QO4eDot5%2BjMv57VQiF_-vL5FujnZVxDKHg3bLv9LW-QAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to