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

Input

dictionary / required

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

Return value

dictionary

A dictionary of the version parts.

If unable to parse the string, returns None.

Returned: success

buildmetadata

string

Build metadata version

Returned: when supported

major

string

Major version

Returned: success

minor

string

Minor version

Returned: success

patch

string

Patch version

Returned: success

prerelease

string

Prerelease/Service pack version

Returned: when supported

Authors

  • Cloudera Labs

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.