--- - name: Lineinfile example hosts: linux become: yes become_method: sudo tasks: - name: "lineinfile module example" lineinfile: path: /home/myuser/test line: "parametre 1" state: present backup: no