diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /lib/ansible/plugins/filter/to_uuid.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/ansible/plugins/filter/to_uuid.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/ansible/plugins/filter/to_uuid.yml b/lib/ansible/plugins/filter/to_uuid.yml new file mode 100644 index 0000000..266bf05 --- /dev/null +++ b/lib/ansible/plugins/filter/to_uuid.yml @@ -0,0 +1,30 @@ +DOCUMENTATION: + name: to_uuid + version_added: "2.9" + short_description: namespaced UUID generator + description: + - Use to generate namespeced Universal Unique ID. + positional: _input, namespace + options: + _input: + description: String to use as base fo the UUID. + type: str + required: true + namespace: + description: UUID namespace to use. + type: str + default: 361E6D51-FAEC-444A-9079-341386DA8E2E + +EXAMPLES: | + + # To create a namespaced UUIDv5 + uuid: "{{ string | to_uuid(namespace='11111111-2222-3333-4444-555555555555') }}" + + + # To create a namespaced UUIDv5 using the default Ansible namespace '361E6D51-FAEC-444A-9079-341386DA8E2E' + uuid: "{{ string | to_uuid }}" + +RETURN: + _value: + description: Generated UUID. + type: string |