I am using the lineinfile module to define the SMART_HOST value in a 
sendmail.mc file.  I have tried many variations of specifying the 'line=' 
value, but all generate almost but not quite correct results.
    For example: lineinfile: dest=/etc/mail/sendmail.mc state=present 
regexp='SMART_HOST' line="define(`SMART_HOST', `{{smarthost}}')dnl"
    generates:  define(\`SMART_HOST', \`gateway.here.com')dnl

    Or: lineinfile: dest=/etc/mail/sendmail.mc state=present 
regexp='SMART_HOST' line='define(`SMART_HOST'', `{{smarthost}}'')dnl'  
(that is two single quotes)
    generates:  define(`SMART_HOST, `gateway.here.com)dnl

    And: lineinfile: dest=/etc/mail/sendmail.mc state=present 
regexp='SMART_HOST' line="define(`SMART_HOST"'", `{{smarthost}}"'")dnl"  
(double quote, single, double)
    generates:  define(`SMART_HOST", `gateway.here.com")dnl
 
    And so on.  Everything I have tried either comes close or just totally 
fails.  The result I am looking for is:  define(`SMART_HOST', 
`gateway.here.com')dnl
    Does anyone know the proper quoting and escaping required to achieve 
this through YAML?
    Thanks,
    -Mark



-- 
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/c46c39da-31ee-4eee-a52e-b39cf79b0668%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to