community.general.hashids_decode filter – Decodes a sequence of numbers from a YouTube-like hash
Note
This filter plugin is part of the community.general collection (version 12.6.1).
You might already have this collection installed if you are using the ansible package. 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 community.general.
To use it in a playbook, specify: community.general.hashids_decode.
New in community.general 3.0.0
Synopsis
- Decodes a sequence of numbers from a YouTube-like hash.
Input
This describes the input of the filter, the value before | community.general.hashids_decode.
Parameter | Comments |
|---|---|
Input string / required | A YouTube-like hash. |
Keyword parameters
This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | community.general.hashids_decode(key1=value1, key2=value2, ...)
Parameter | Comments |
|---|---|
alphabet list / elements=string | String of 16 or more unique characters to produce a hash. |
min_length integer | Minimum length of hash produced. |
salt string | String to use as salt when hashing. Default: |
Examples
- name: Convert hash to list of integers
ansible.builtin.debug:
msg: "{{ 'o2fXhV' | community.general.hashids_decode }}"
# Produces: [1, 2, 3]
Return Value
Key | Description |
|---|---|
Return value list / elements=integer | A list of integers. Returned: success |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/hashids_decode_filter.html