diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /lib/ansible/plugins/filter/b64decode.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/ansible/plugins/filter/b64decode.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/ansible/plugins/filter/b64decode.yml b/lib/ansible/plugins/filter/b64decode.yml new file mode 100644 index 0000000..30565fa --- /dev/null +++ b/lib/ansible/plugins/filter/b64decode.yml @@ -0,0 +1,29 @@ +DOCUMENTATION: + name: b64decode + author: ansible core team + version_added: 'historical' + short_description: Decode a base64 string + 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 }}"``. + positional: _input + options: + _input: + description: A base64 string to decode. + type: string + required: true + +EXAMPLES: | + # b64 decode a string + lola: "{{ 'bG9sYQ==' | b64decode }}" + + # b64 decode the content of 'b64stuff' variable + stuff: "{{ b64stuff | b64encode }}" + +RETURN: + _value: + description: The contents of the base64 encoded string. + type: string |