Hi everybody,

when I try the following in a playbook (ansible 1.6.2):

- lineinfile:
    dest: /etc/nagios/nrpe.cfg
    backrefs: yes
    regexp: '^(allowed_hosts=).*$'
    line: '\1{{ monitoring_server }}'

where "monitoring_server=10.0.0.5", it replaces the line 
"allowed_hosts=127.0.0.1" with "H.0.0.5". 
If I put any character between "\1" and "{{", it seems to be working 
correctly, but I don't want an additional character there.

Thanks and best regards,
Gregor

-- 
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/185ab4d1-de45-42a8-a138-a843d6499107%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to