Update `files.line`/`files.replace` operations for new interpolate variables kwarg.
@@ -368,7 +368,11 @@ def line(
host.create_fact(
FindInFile,
- kwargs={'path': path, 'pattern': match_line},
+ kwargs={
+ 'path': path,
+ 'pattern': match_line,
+ 'interpolate_variables': interpolate_variables,
+ },
data=[replace or line],
)
@@ -383,7 +387,11 @@ def line(
host.delete_fact(
FindInFile,
- kwargs={'path': path, 'pattern': match_line},
+ kwargs={
+ 'path': path,
+ 'pattern': match_line,
+ 'interpolate_variables': interpolate_variables,
+ },
)
# Line(s) exists and we have want to ensure they're correct
@@ -449,7 +457,11 @@ def replace(
)
host.create_fact(
FindInFile,
- kwargs={'path': path, 'pattern': match},
+ kwargs={
+ 'path': path,
+ 'pattern': match,
+ 'interpolate_variables': interpolate_variables,
+ },
data=[],
)
else:
