community.general.hashids_decode (8.5.0) — filter

Decodes a sequence of numbers from a YouTube-like hash

| "added in version" 3.0.0 of community.general"

Authors: Andrew Pantuso (@Ajpantuso)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Decodes a sequence of numbers from a YouTube-like hash.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Convert hash to list of integers
  ansible.builtin.debug:
    msg: "{{ 'o2fXhV' | community.general.hashids_decode }}"

Inputs

    
salt:
    default: excel
    description:
    - String to use as salt when hashing.
    type: str

_input:
    description: A YouTube-like hash.
    required: true
    type: string

alphabet:
    description:
    - String of 16 or more unique characters to produce a hash.
    elements: str
    type: list

min_length:
    description:
    - Minimum length of hash produced.
    type: integer

Outputs

_value:
  description: A list of integers.
  elements: integer
  type: list