community / community.crypto / 2.18.0 / filter / parse_serial Convert a serial number as a colon-separated list of hex numbers to an integer | "added in version" 2.18.0 of community.crypto" Authors: Felix Fontein (@felixfontein)community.crypto.parse_serial (2.18.0) — filter
Install with ansible-galaxy collection install community.crypto:==2.18.0
collections: - name: community.crypto version: 2.18.0
Parses a colon-separated list of hex numbers of the form C(00:11:22:33) and returns the corresponding integer.
- name: Parse serial number ansible.builtin.debug: msg: "{{ '11:22:33' | community.crypto.parse_serial }}"
_input: description: - A serial number represented as a colon-separated list of hex numbers between 0 and 255. - These numbers are interpreted as the byte presentation of an unsigned integer in network byte order. That is, C(01:00) is interpreted as the integer 256. required: true type: string
_value: description: - The serial number as an integer. type: int