package_install_version_cmp_update

Install a package or verify if it is installed in a specific version, or higher or lower version than a version specified, optionally test update or not (Debian-, Red Hat- or SUSE-like systems only).

⚙️ Compatible targets: Linux

⚠️ Deprecated: This method is deprecated and should not be used.

Parameters

NameDocumentation
nameName of the package to install or verify.

This parameter is required.
version_comparatorComparator between installed version and defined version, can be ==,<=,>=,<,>,!=.

Choices:
  • ==
  • <=
  • >=
  • <
  • >
  • !=

This parameter is required.
package_versionThe version of the package to verify (can be "latest" for latest version).

This parameter is required.
actionAction to perform, can be add, verify (defaults to verify).

This parameter is required.
update_policyWhile verifying packages, check against latest version ("true") or just installed ("false").

This parameter is required.

Outcome conditions

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

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

Example

method: package_install_version_cmp_update
params:
  package_version: VALUE
  update_policy: VALUE
  action: VALUE
  version_comparator: ==
  name: VALUE

Documentation

Example:

methods:
    "any" usebundle => package_install_version_cmp_update("postgresql", ">=", "9.1", "verify", "false");