cloudera.exe.version test – compare Cloudera version strings
Note
This test plugin is part of the cloudera.exe collection (version 3.0.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cloudera.exe.
.
To use it in a playbook, specify: cloudera.exe.version
.
New in cloudera.exe 3.0.0
Synopsis
Compare version strings using the Cloudera versioning scheme.
Cloudera versioning is an extension of Semantic Versioning that uses the
prerelease
segment to indicate service packs or extended patch releases.Moreover, this versioning scheme allow the
prerelease
delimiter to use whitespace (' '
) and dots ('.'
) in addition to the semantic version’s dash ('-'
).
Input
This describes the input of the test, the value before is cloudera.exe.version
or is not cloudera.exe.version
.
Parameter |
Comments |
---|---|
Left hand version to compare |
Keyword parameters
This describes keyword parameters of the test. These are the values key1=value1
, key2=value2
and so on in the following
examples: input is cloudera.exe.version(key1=value1, key2=value2, ...)
and input is not cloudera.exe.version(key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Comparison operator Choices:
|
|
Right hand version to compare |
Examples
- name: Cloudera version test examples
assert:
that:
- "'7.3.1' is version('8.0.0', 'lt')"
- "'7.1.9 SP3' is version('7.1.9', 'gt')"
- "'7.1.9 SP3' is version('7.1.9 SP2', 'gt')"
Return Value
Key |
Description |
---|---|
Returns Returned: success |