file_ensure_key_value_present_in_ini_section

Ensure that a key-value pair is present in a section in a specific location. The objective of this method is to handle INI-style files.

⚙️ Compatible targets: Linux

⚠️ 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.
sectionName of the INI-style section under which the line should be added or modified (not including the [] brackets).

This parameter is required.
nameName of the key to add or edit.

This parameter is required.
valueValue of the key to add or edit.

This parameter is required.

Outcome conditions

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

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

Example

method: file_ensure_key_value_present_in_ini_section
params:
  name: VALUE
  section: VALUE
  path: VALUE
  value: VALUE