file_lines_present

Ensure that one or more lines are present in a file.

⚙️ Compatible targets: Linux, Windows

Parameters

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

This parameter is required.
linesLine(s) to add in the file.

This parameter is required.

Example

method: file_lines_present
params:
  path: VALUE
  lines: VALUE

Documentation

Edit the file, and ensure it contains the defined line(s). Regular expression can be used for the file name.