cloudera.cluster.cm_license lookup – Get the details of a Cloudera license
Note
This lookup plugin is part of the cloudera.cluster collection (version 5.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.cluster
.
You need further requirements to be able to use this lookup plugin,
see Requirements for details.
To use it in a playbook, specify: cloudera.cluster.cm_license
.
New in cloudera.cluster 5.0.0
Synopsis
Parses and verifies the contents of a Cloudera license.
Returns the license details, including the computed
password
.
Requirements
The below requirements are needed on the local controller node that executes this lookup.
GnuPGP
gpg
executablepython-gnupg
Terms
Parameter |
Comments |
---|---|
Path to the license file. Will raise an error if multiple paths are specified. If no |
Keyword parameters
This describes keyword parameters of the lookup. These are the values key1=value1
, key2=value2
and so on in the following
examples: lookup('cloudera.cluster.cm_license', key1=value1, key2=value2, ...)
and query('cloudera.cluster.cm_license', key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Contents of the license to parse. |
|
Flag whether to verify the license signature. Choices:
|
Notes
Note
When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
lookup('cloudera.cluster.cm_license', term1, term2, key1=value1, key2=value2)
andquery('cloudera.cluster.cm_license', term1, term2, key1=value1, key2=value2)
Examples
- name: Parse a Cloudera license file
ansible.builtin.debug:
msg: "{{ lookup('cm_license', '/path/to/license_file.txt') }}"
- name: Parse a Cloudera license file, but enable verification
ansible.builtin.debug:
msg: "{{ lookup('cm_license', '/path/to/license_file.txt', verify=True) }}"
- name: Parse Cloudera license content
ansible.builtin.debug:
msg: "{{ lookup('cm_license', contents=body) }}"
vars:
body: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
{
<license content>
}
----BEGIN PGP SIGNATURE-----
<PGP signature>
-----END PGP SIGNATURE-----
Return Value
Key |
Description |
---|---|
The contents of the license. Returned: success |
|
Date of license deactivation. Returned: always |
|
Date of license expiration. Returned: always |
|
List of enabled features. Returned: when supported |
|
Name of the license. Returned: always |
|
Computed password of the license. Returned: always |
|
Date of license activation. Returned: always |
|
Unique identifier of the license. Returned: always |
|
Version of the license. Returned: always |