ansible.builtin.b64decode (v2.16.0) — filter

Decode a base64 string

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

Authors: ansible core team

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Base64 decoding function.

The return value is a string.

Trying to store a binary blob in a string most likely corrupts the binary. To base64 decode a binary blob, use the ``base64`` command and pipe the encoded data through standard input. For example, in the ansible.builtin.shell`` module, ``cmd="base64 --decode > myfile.bin" stdin="{{ encoded }}"``.

Inputs

    
_input:
    description: A base64 string to decode.
    required: true
    type: string

Outputs

_value:
  description: The contents of the base64 encoded string.
  type: string