Should have known, there's always a module to do what I want better. 
 Thanks very much I'll try this out!

On Tuesday, 12 April 2016 09:42:09 UTC-6, Matt Martz wrote:
>
> 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] 
> <javascript:>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/3f11343e-0720-4df5-8145-0524da7c18c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to