lineinfile - docs.ansible.com
docs.ansible.com › ansible › 2Dec 01, 2020 · Used with state=present.If set, line can contain backreferences (both positional and named) that will get populated if the regexp matches. This flag changes the operation of the module slightly; insertbefore and insertafter will be ignored, and if the regexp doesn't match anywhere in the file, the file will be left unchanged.