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
Name | Documentation |
---|---|
name | Name of the package to install or verify. This parameter is required. |
version_comparator | Comparator between installed version and defined version, can be ==,<=,>=,<,>,!=. Choices:
This parameter is required. |
package_version | The version of the package to verify (can be "latest" for latest version). This parameter is required. |
action | Action to perform, can be add, verify (defaults to verify). This parameter is required. |
update_policy | While 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
- ☑️ Already compliant:
- ❌ 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");