Using Ansible blockinfile Module

Ansible blockinfile module is used to insert/update/remove a block of lines. The block will be surrounded by a marker, like begin and end, to make the task idempotent. If you want to modify/ insert only a line, use lineinfile module. You can find the documentation in You can find more details of blockinfile module in Ansible documentation. […]