saltstack/salt — pull request #18615 by eliasp (2014-12-01 20:36:33+00:00)
Title: Don't change a file again if it's already been done.

When using `append_if_not_found=True` or `prepend_if_not_found=True`
the file will grow infinitely as replace() didn't check until now
whether the change has already been made.

This fixes this behavior (#18612).