Also, if your run the playbook in verbose mode, you'll see what ansible is sending. This can help you determine what might be wrong with the sent data.
Also, use the 'return_content=yes' on the task to see what the server is responding. Showing us those two things can help you troubleshoot... On Wed, Feb 4, 2015 at 9:04 AM, Giovanni Tirloni <[email protected]> wrote: > On Wed, 04 Feb 2015 18:48 +0000, Mark Olliver <[email protected]> > wrote: > > Hi, > > > > I have the following line but i fear the uri module is not encoding the > > file first and thus fails to send the file. I tried to set a variable via > > a > > command and uuencode but that also failed - any ideas or do i need to > > shell > > and use curl to post? > > > > - uri: url=http://localhost:8080/store.json method=POST body="{{ > > lookup('file','test') }}" status_code=200 > > HEADER_Content-Type="application/json" > > > > test is a json file. > > Hi Olivier, > > What's the error and what do you get on the server's logs? > > Giovanni > > -- > 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/1423076675.33876.223141489.119A3E6B%40webmail.messagingengine.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACUx58OhoSL1p%3DXMLziDcV7ka%2B0pUOacaBM_%3DSXOF0ZVtFxbuQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
