community.crypto.parse_serial filter – Convert a serial number as a colon-separated list of hex numbers to an integer
Note
This filter plugin is part of the community.crypto collection (version 3.2.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.crypto.
To use it in a playbook, specify: community.crypto.parse_serial.
New in community.crypto 2.18.0
Synopsis
- Parses a colon-separated list of hex numbers of the form
00:11:22:33and returns the corresponding integer.
Input
This describes the input of the filter, the value before | community.crypto.parse_serial.
Parameter | Comments |
|---|---|
Input string / required | 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, |
See Also
See also
- community.crypto.to_serial filter plugin
-
Convert an integer to a colon-separated list of hex numbers.
Examples
---
- name: Parse serial number
ansible.builtin.debug:
msg: "{{ '11:22:33' | community.crypto.parse_serial }}"
Return Value
Key | Description |
|---|---|
Return value integer | The serial number as an integer. 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/crypto/parse_serial_filter.html