Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /lib/python3.9/site-packages/ansible/plugins/filter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.9/site-packages/ansible/plugins/filter/human_readable.yml
DOCUMENTATION:
  name: human_redable
  version_added: "historical"
  short_description: Make bytes/bits human readable
  description:
    - Convert byte or bit figures to more human readable formats.
  positional: _input, isbits, unit
  options:
    _input:
      description: Number of bytes, or bits. Depends on I(isbits).
      type: int
      required: true
    isbits:
      description: Whether the input is bits, instead of bytes.
      type: bool
      default: false
    unit:
      description: Unit to force output into. If none specified the largest unit arrived at will be used.
      type: str
      choices: [ 'Y', 'Z', 'E', 'P', 'T', 'G', 'M', 'K', 'B']
EXAMPLES: |

  # size => "1.15 GB"
  size: "{{ 1232345345 | human_readable }}"

  # size => "1.15 Gb"
  size_bits: "{{ 1232345345 | human_readable(true) }}"

  # size => "1175.26 MB"
  size_MB: "{{ 1232345345 | human_readable(unit='M') }}"

RETURN:
  _value:
    description: Human readable byte or bit size.
    type: str

Yohohohohohooho | Sanrei Aya