|
|
|
@ -11,6 +11,12 @@ DOCUMENTATION:
|
|
|
|
description: A string to encode.
|
|
|
|
description: A string to encode.
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
|
|
|
|
encoding:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- The encoding to use to transform from a text string to a byte string.
|
|
|
|
|
|
|
|
- Defaults to using 'utf-8'.
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
required: false
|
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES: |
|
|
|
|
EXAMPLES: |
|
|
|
|
# Base64 encode a string
|
|
|
|
# Base64 encode a string
|
|
|
|
@ -19,6 +25,10 @@ EXAMPLES: |
|
|
|
|
# Base64 encode the content of 'stuff' variable
|
|
|
|
# Base64 encode the content of 'stuff' variable
|
|
|
|
b64stuff: "{{ stuff | b64encode }}"
|
|
|
|
b64stuff: "{{ stuff | b64encode }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Base64 encode the content with different encoding
|
|
|
|
|
|
|
|
b64stuff: "{{ 'Ansible - くらとみ\n' | b64encode(encoding='utf-16-le') }}"
|
|
|
|
|
|
|
|
# => 'QQBuAHMAaQBiAGwAZQAgAC0AIABPMIkwaDB/MAoA'
|
|
|
|
|
|
|
|
|
|
|
|
RETURN:
|
|
|
|
RETURN:
|
|
|
|
_value:
|
|
|
|
_value:
|
|
|
|
description: A Base64 encoded string.
|
|
|
|
description: A Base64 encoded string.
|
|
|
|
|