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.

Outcome conditions

You need to replace ${path} with its actual canonified value.

  • ✅ Ok: file_lines_present_${path}_ok
    • ☑️ Already compliant: file_lines_present_${path}_kept
    • 🟨 Repaired: file_lines_present_${path}_repaired
  • ❌ Error: file_lines_present_${path}_error

Example

method: file_lines_present
params:
  lines: VALUE
  path: VALUE

Documentation

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