https://multiplefilemaker.com/
ansible find and replace

How do I edit an Ansible file? What is Backrefs Ansible?

ansible find and replace
How do I edit an Ansible file?

This module ensures a particular line is in a file, or replace an existing line using a ... (both positional and named) that will get populated if the regexp matches.