Impedir blockinfile do Ansible de duplicar entrada
Tags: ansible Category: DevOps
You should specify {mark}
keyword in the marker
parameter:
This will cause Ansible to insert a line at the beginning and at the end of the block replacing {mark}
accordingly with BEGIN
and END
:
Otherwise Ansible has no clue, where the block starts and where it ends, so on every run it considers the block is not present and inserts a new one.