I am trying to edit a string in a multi-line file. For instance, if I had this string:
This is a file and I am editing it I want to add the string "new" in front of file *if* it does not exist already. I've tried lineinfile, but the issue is that I don't know what else is on the line. There could be more data after "This is a file and I am editing it" that I don't want to change. What is the best way to do this? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9c8e2dcf-ab7d-4984-ac0a-83e818699135n%40googlegroups.com.
