I have the following in a playbook to uncomment a line.  The first time I 
run it everything works fine.  If I run it again it inserts a "Banner 
/etc/issue.net" at the EOF.  Is there a better way to do this?

 - name:  uncomment a line
      lineinfile: backup=yes state=present dest=/etc/ssh/sshd_config 
regexp='^#Banner' line='Banner /etc/issue.net'

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f2c8796f-cf2e-4c20-8c10-764652f9de6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to