I know this isn't really a direct answer to your question, but why not use
the `uri` module instead?

- uri:
    url: "http://localhost:9200/_cluster/settings";
    method: PUT
    body:
      transient:
        cluster.routing.allocation.enable: "none"
    body_format: json

On Tue, Apr 12, 2016 at 10:29 AM, Ryan Groten <[email protected]> wrote:

> I am trying to execute a task that runs the following command (which
> includes a number of quote, brackets, colons, etc):
>
> command: curl -XPUT "http://localhost:9200/_cluster/settings"; -d'{
> "transient" : { "cluster.routing.allocation.enable" : "none" } }'
>
> I tried escaping all the quotes and {}, but that doesn't seem to work.
>
> command: 'curl -XPUT "http://localhost:9200/_cluster/settings"; -d\'\{
> "transient" : \{ "cluster.routing.allocation.enable" : "none" \} \}''
>
> I also tried treating the whole command as a jinja string (I think?)
>
> command: {{ 'curl -XPUT "http://localhost:9200/_cluster/settings"; -d'{
> "transient" : { "cluster.routing.allocation.enable" : "none" } }'' }}
>
> Thanks,
> Ryan
>
> --
> 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/ef4f9432-a75e-4ab1-91f1-487c8e0a68a4%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ef4f9432-a75e-4ab1-91f1-487c8e0a68a4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

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

Reply via email to