Re: [ansible-project] Syntax for running commands with braces in them

2016-04-14 Thread Ryan Groten
Finally got it working, thanks everyone for the suggestions! For reference here's what ended up working: - name: Set uri endpoints set_fact: es_disable_allocation: transient: cluster.routing.allocation.enable: "none" - name: Disable shard allocation to prevent es from

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-13 Thread 'ac427' via Ansible Project
never mind. I should have read the whole thread . On Tuesday, April 12, 2016 at 4:12:46 PM UTC-4, Ryan Groten wrote: > > I must be close, but it's not working with uri module. Here's what I put > in the role. Setting the uri_body as a fact beforehand and using "to_json" > was an attempt to

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-13 Thread 'ac427' via Ansible Project
I didn't quite follow the exact issue, but I was able to download a page with {: in file name . Below is my test [vagrant@admin ansible]$ ansible-playbook -i hosts -u root --tags=url -l admin base.yml PLAY [base role] **

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
I must be close, but it's not working with uri module. Here's what I put in the role. Setting the uri_body as a fact beforehand and using "to_json" was an attempt to get around the error I'm getting, but that doesn't help either. - name: Set uri_body (workaround) set_fact: uri_body:

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
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:

Re: [ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Matt Martz
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

[ansible-project] Syntax for running commands with braces in them

2016-04-12 Thread Ryan Groten
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 {},