file_enforce_content

Enforce the content of a file.

⚙️ Compatible targets: Linux, Windows

⚠️ Deprecated: This method is deprecated and should not be used.

Parameters

NameDocumentation
pathFile name to edit (absolute path on the target node).

This parameter is required.
linesLine(s) to add in the file - if lines is a list, please use @{lines} to pass the iterator rather than iterating over each values.

This parameter is required.
enforceEnforce the file to contain only line(s) defined (true or false).

This parameter is required.

Example

method: file_enforce_content
params:
  enforce: VALUE
  path: VALUE
  lines: VALUE