ovirt.ovirt.convert_to_bytes filter – Convert units to bytes
Note
This filter plugin is part of the ovirt.ovirt collection (version 3.2.0).
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 ovirt.ovirt
.
To use it in a playbook, specify: ovirt.ovirt.convert_to_bytes
.
Synopsis
This method convert units to bytes, which follow IEC standard
Input
This describes the input of the filter, the value before | ovirt.ovirt.convert_to_bytes
.
Parameter |
Comments |
---|---|
Value to be converted |
Examples
- name: Get number of bytes
ansible.builtin.set_fact:
disk_size: "{{ '1KiB' | ovirt.ovirt.convert_to_bytes }}"
Return Value
Key |
Description |
---|---|
Amount of bytes Returned: success |