mirror of https://github.com/ansible/ansible.git
Document lineinfile regexp gotcha
You typically want the lineinfile module to operate in an indempotent way, similar to using "sed -i", so your regexp needs to match the line to edit both before and after the edit, otherwise on a second run the regexp will no longer match the original text line and you will end up with a second copy of the replacement line at the top/bottom of the file.pull/47912/head
parent
8e561d1eb4
commit
e4a2d2423a
Loading…
Reference in New Issue