ansible.builtin.human_to_bytes (v2.16.5) — filter

Get bytes from string

| "added in version" historical of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Convert a human readable byte or bit string into a number bytes.

Inputs

    
_input:
    description: Human readable description of a number of bytes.
    required: true
    type: int

isbits:
    description: If V(True), force to interpret only bit input; if V(False), force bytes.
      Otherwise use the notation to guess.
    type: bool

default_unit:
    choices:
    - Y
    - Z
    - E
    - P
    - T
    - G
    - M
    - K
    - B
    description: Unit to assume when input does not specify it.
    type: str

Outputs

_value:
  description: Integer representing the bytes from the input.
  type: int