title: Ansible escaping double quotes and single quotes
body: <p>I would like insert a nrpe command in the nrpe.cfg with this ansible command </p>
  
  <pre><code>check_tomcat_threads.pl -H localhost -p 30011 -C '"http-bio-30011"' -w 200 -c 50
  </code></pre>
  
  <p>But the the problem are the '" and "'</p>
  
  <p>To set this line in the nrpe.cfg use the command </p>
  
  <pre><code> - { regexp: '^command\[SERVICE_tomcat_pi_Threads\]', line: "command[SERVICE_tomcat_Threads_pi]=/appiu/monitoring/check_tomcat_threads.pl -H localhost -p 30011 -C '\"http-bio-30011\"' -w 200 -c 50" }
  </code></pre>
  
  <p>but the result in the nrpe.cfg is </p>
  
  <pre><code>...-C http-bio-30011..
  </code></pre>
  
  <p>If I use ''\"http-bio-30011\"'' in the ansible script</p>
  
  <p>the result in the nrpe.cfg is</p>
  
  <pre><code>...-C "http-bio-30011"... 
  </code></pre>
  
  <p>How I can escaping the single quotes and the double quotes to get this <code>-C '"http-bio-30011"'</code>?</p>
  
  <p>Greetings Georg</p>