file_block_present_in_section

Ensure that a section contains exactly a text block.

⚙️ Compatible targets: Linux

Parameters

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

This parameter is required.
section_startStart of the section.

This parameter is required.
section_endEnd of the section.

This parameter is required.
blockBlock representing the content of the section.

This parameter is required.

Example

method: file_block_present_in_section
params:
  section_start: VALUE
  block: VALUE
  section_end: VALUE
  path: VALUE

Documentation

Ensure that a section contains exactly a text block. A section is delimited by a header and a footer.

  • If the section exists, its content will be replaced if needed
  • Otherwise it will be created at the end of the file