Hi Bennett, It was indeed a bug in the uri module. I've sent in a pull request which fixes the issue.
https://github.com/ansible/ansible/pull/5826 Romeo On Mon, Jan 20, 2014 at 10:44 AM, bennett ponder <[email protected]> wrote: > Here's my ansible version: > > ansible --version > ansible 1.4.4 > > I'm trying to get ansible to submit an http request for specific a url, and > verify it gets a 301. It does not need to follow the location header and > make the next http request. > > I figured that follow_redirects=no would solve this for me, however I see > ansible make the initial http request, receive a 301, then make the next > http request and get a 200 back. It then fails because I've said > status_code=301, it must only care about the second http request it made. > > This is in my task: > > - name: Make sure the HTTP Request gets a 301 redirect > action: uri url=http://{{ inventory_hostname }}.test.com/img/site.png > status_code=301 HEADER_Host="test.site.com" follow_redirects=no > delegate_to: 127.0.0.1 > > > Any help would be appreciated. > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. -- Romeo -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
