Try changing the body to something simple and seeing if it works. I'm
guessing that something inside of the file.json that is causing a parse
error. One option is to put the contents of the file.json directly into the
body="{ jsonk: 'jsonv', }"

Hope that helps.

On Sat, Apr 4, 2015 at 9:26 AM, Tzach Livyatan <[email protected]>
wrote:

> Hello
> The following curl from the host to the provision servers works fine:
>  curl -X POST --header "Content-Type: application/json" -d @file.json http
> ://public-ip/api
>
> Trying to use uri module for the same, I used:
> - local_action: uri url=http://public-ip/api method=POST body="{{
> lookup('file','file.json') }}" HEADER_Content-Type="application/json"
>  sudo: false
>
> Only to get
> msg: this module requires key=value arguments
>
> Any idea whats going on here?
> Thanks
>
>
>
>  --
> 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/7bb1abc8-74f2-41c2-a4ac-4106718926ea%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7bb1abc8-74f2-41c2-a4ac-4106718926ea%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CACUx58PGteo19VkoNbcp94G7YbRCZ3JuwowFRjcrsE43jc1%3DnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to