cloudera.exe.version filter – Parse a Cloudera Manager version string
Note
This filter 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
Cloudera Manager version string parsing.
Returns a dictionary of the version parts.
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 filter, the value before | cloudera.exe.version
.
Parameter |
Comments |
---|---|
A version string to parse. |
Examples
- name: Parse a standard version string
ansible.builtin.set_fact:
standard: "{{ '1.2.3' | cloudera.exe.version }}"
- name: Parse a version plus build number
ansible.builtin.set_fact:
build: "{{ '1.2.3.4' | cloudera.exe.version }}"
- name: Parse a version plus service pack (as prerelease)
ansible.builtin.set_fact:
service_pack: "{{ '1.2.3 SP2' | cloudera.exe.version }}"
- name: Parse a version plus build metadata string
ansible.builtin.set_fact:
build: "{{ '1.2.3+build7' | clouder.exe.version }}"
- name: Parse a version plus prerelease and build string
ansible.builtin.set_fact:
full: "{{ '1.2.3-rc1+build7' | cloudera.exe.version }}"
Return Value
Key |
Description |
---|---|
A dictionary of the version parts. If unable to parse the string, returns Returned: success |
|
Build metadata version Returned: when supported |
|
Major version Returned: success |
|
Minor version Returned: success |
|
Patch version Returned: success |
|
Prerelease/Service pack version Returned: when supported |