mirror of https://github.com/ansible/ansible.git
document base64 filters (#77657)
* document base64 filters * Update lib/ansible/plugins/filter/b64decode.yml Co-authored-by: Sandra McCann <samccann@redhat.com> * Update lib/ansible/plugins/filter/b64encode.yml Co-authored-by: Sandra McCann <samccann@redhat.com> Co-authored-by: Sandra McCann <samccann@redhat.com>pull/77689/head
parent
ec00c9c64e
commit
fb2f080b42
@ -0,0 +1,25 @@
|
|||||||
|
DOCUMENTATION:
|
||||||
|
name: b64decode
|
||||||
|
author: ansible core team
|
||||||
|
version_added: 'historical'
|
||||||
|
short_description: Decode a base64 string
|
||||||
|
description:
|
||||||
|
- Base64 decoding function
|
||||||
|
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
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
DOCUMENTATION:
|
||||||
|
name: b64encode
|
||||||
|
author: ansible core team
|
||||||
|
version_added: 'historical'
|
||||||
|
short_description: Encode a string as base64
|
||||||
|
description:
|
||||||
|
- Base64 encoding function
|
||||||
|
positional: _input
|
||||||
|
options:
|
||||||
|
_input:
|
||||||
|
description: A string to encode
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
EXAMPLES: |
|
||||||
|
# b64 encode a string
|
||||||
|
b64lola: "{{ 'lola'|b64encode }}"
|
||||||
|
|
||||||
|
# b64 encode the content of 'stuff' variable
|
||||||
|
b64stuff: "{{ stuff|b64encode }}"
|
||||||
|
|
||||||
|
RETURN:
|
||||||
|
_value:
|
||||||
|
description: A base64 encoded string
|
||||||
|
type: string
|
||||||
Loading…
Reference in New Issue