community.general.hashids_decode 过滤器 – 从类似 YouTube 的哈希值解码数字序列
注意
此过滤器插件是 community.general 集合 (版本 10.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install community.general
。
要在 playbook 中使用它,请指定: community.general.hashids_decode
。
community.general 3.0.0 中的新增功能
概要
从类似 YouTube 的哈希值解码数字序列。
输入
这描述了过滤器的输入,即 | community.general.hashids_decode
之前的 value。
关键字参数
这描述了过滤器的关键字参数。这些是在以下示例中的值 key1=value1
,key2=value2
等:input | community.general.hashids_decode(key1=value1, key2=value2, ...)
示例
- name: Convert hash to list of integers
ansible.builtin.debug:
msg: "{{ 'o2fXhV' | community.general.hashids_decode }}"
# Produces: [1, 2, 3]