environment_variable_present

Enforce an environment variable value.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
nameName of the environment variable.

This parameter is required.
valueValue of the environment variable.

This parameter is required.

Outcome conditions

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

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

Example

method: environment_variable_present
params:
  value: VALUE
  name: VALUE

Documentation

Force the value of a shell environment variable. The variable will be written in /etc/environment. A newly created environment variable will not be usable by the agent until it is restarted.