package_state_options

Enforce the state of a package with options.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
nameName of the package, or path to a local package if state is present.

This parameter is required.
versionVersion of the package, can be "latest" for latest version or "any" for any version (defaults to "any").

This parameter is optional.
architectureArchitecture of the package, can be an architecture name or "default" (defaults to "default").

This parameter is optional.
providerPackage provider to use, can be "yum", "apt", "zypper", "zypper_pattern", "slackpkg", "pkg", "ips", "nimclient", "snap" or "default" for system default package manager (defaults to "default").

Choices:
  • default
  • yum
  • apt
  • zypper
  • zypper_pattern
  • slackpkg
  • pkg
  • ips
  • nimclient
  • snap

This parameter is optional.
stateState of the package, can be "present" or "absent" (defaults to "present").

Choices:
  • present
  • absent

This parameter is optional.
optionsOptions no pass to the package manager (defaults to empty).

This parameter is optional.

Outcome conditions

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

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

Example

method: package_state_options
params:
  version: OPTIONAL_VALUE
  state: present
  architecture: OPTIONAL_VALUE
  provider: default
  options: OPTIONAL_VALUE
  name: VALUE

Documentation

See package_state for documentation.