Thanks Joanna. 

I think I’ve solved my particular issue by making heavy use of templates where 
I can put the double quotes and backslashes where I need them, then use the 
dest file as input to a command (e.g., mysql < my template.sql)

Jim


> On Mar 4, 2015, at 8:27 PM, Joanna Delaporte <[email protected]> 
> wrote:
> 
> I use shell a fair amount and have occasionally run into some similar issues. 
> I sometimes wrap the entire shell command in single or double quotes, if it 
> contains a special character. An example:
> 
> - name: determine firefox version
>   shell: "firefox -v | cut -d ' ' -f3"
>   register: ffversion
> 
> 
> I also used double quotes with sed commands in the past, but lineinfile works 
> just as well. However, I sometimes have to play with the quote placement for 
> a while to make lineinfile work.
> 
> Joanna
> 
> On Wednesday, March 4, 2015 at 4:17:34 PM UTC-6, Jim McMahon wrote:
> The shell module seems to escape special characters like \ and ".   Is there 
> a way so that the shell module doesn't escape these characters? Are there any 
> tips on how handle situations where you want double quotes?
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ansible-project/IN32_h4gwBE/unsubscribe 
> <https://groups.google.com/d/topic/ansible-project/IN32_h4gwBE/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/8c78206c-85aa-4279-9227-f2380b12f9d3%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/ansible-project/8c78206c-85aa-4279-9227-f2380b12f9d3%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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/1F55A052-1430-46B5-BD40-FB13952E8EDA%40flatworldknowledge.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to