Hello
I want to change the configuration of vim, in order to do set mouse=r.
At the beginning this line is commented by default. Using inlinefile
module, I check by regexp the line commented and I replace it with the new
line like this:
- name: Uncommenting mouse=a in /etc/vim/vimrc
lineinfile:
path: /etc/vim/vimrc
regexp: '^"set mouse=a'
line: 'set mouse=r'
First runs is okay, but the second run ansible append another line to the
file like this:
TASK [cassandra_preinstall : Uncommenting mouse=a in /etc/vim/vimrc]
***************************************************************************************************************************************
--- before: /etc/vim/vimrc (content)
+++ after: /etc/vim/vimrc (content)
@@ -56,3 +56,4 @@
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
+set mouse=r
It is like lineinfile does not care about the regexp result that should be
empty.
What I am missing ?
--
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/2ecf8d42-fb41-490a-836f-34626be3f863%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.