package_install_version_cmp

Install a package or verify if it is installed in a specific version, or higher or lower version than a version specified.

⚙️ 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.

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
params:
  name: VALUE
  action: VALUE
  package_version: VALUE
  version_comparator: ==

Documentation

Example:

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