|
|
@ -30,6 +30,7 @@
|
|
|
|
path: "{{ output_dir }}/b64_latin1"
|
|
|
|
path: "{{ output_dir }}/b64_latin1"
|
|
|
|
register: b64_latin1
|
|
|
|
register: b64_latin1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tests themselves
|
|
|
|
- name: copy with utf-8 content in a playbook
|
|
|
|
- name: copy with utf-8 content in a playbook
|
|
|
|
copy:
|
|
|
|
copy:
|
|
|
|
content: "{{ simple_accents }}\n"
|
|
|
|
content: "{{ simple_accents }}\n"
|
|
|
@ -43,7 +44,6 @@
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- 'results.stat.checksum == from_playbook.stat.checksum'
|
|
|
|
- 'results.stat.checksum == from_playbook.stat.checksum'
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: copy with utf8 in a base64 encoded string
|
|
|
|
- name: copy with utf8 in a base64 encoded string
|
|
|
|
copy:
|
|
|
|
copy:
|
|
|
@ -58,22 +58,20 @@
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- 'results.stat.checksum == b64_utf8.stat.checksum'
|
|
|
|
- 'results.stat.checksum == b64_utf8.stat.checksum'
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
|
|
|
|
- name: copy with latin1 in a base64 encoded string
|
|
|
|
#- name: copy with latin1 in a base64 encoded string
|
|
|
|
copy:
|
|
|
|
# copy:
|
|
|
|
content: "{{ latin1_simple_accents|b64decode }}\n"
|
|
|
|
# content: "{{ latin1_simple_accents|b64decode }}\n"
|
|
|
|
dest: "{{ output_dir }}/b64_latin1.txt"
|
|
|
|
# dest: "{{ output_dir }}/b64_latin1.txt"
|
|
|
|
|
|
|
|
#
|
|
|
|
- name: Check that what was written matches
|
|
|
|
#- name: Check that what was written matches
|
|
|
|
stat:
|
|
|
|
# stat:
|
|
|
|
path: "{{ output_dir }}/b64_latin1.txt"
|
|
|
|
# path: "{{ output_dir }}/b64_latin1.txt"
|
|
|
|
register: results
|
|
|
|
# register: results
|
|
|
|
|
|
|
|
#
|
|
|
|
- assert:
|
|
|
|
#- assert:
|
|
|
|
that:
|
|
|
|
# that:
|
|
|
|
- 'results.stat.checksum == b64_latin1.stat.checksum'
|
|
|
|
# - 'results.stat.checksum == b64_latin1.stat.checksum'
|
|
|
|
|
|
|
|
# ignore_errors: True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Template with a unicode string from the playbook
|
|
|
|
- name: Template with a unicode string from the playbook
|
|
|
|
template:
|
|
|
|
template:
|
|
|
@ -103,21 +101,21 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- 'results.stat.checksum == b64_utf8.stat.checksum'
|
|
|
|
- 'results.stat.checksum == b64_utf8.stat.checksum'
|
|
|
|
|
|
|
|
|
|
|
|
#- name: Template with latin1 in a base64 encoded string
|
|
|
|
- name: Template with latin1 in a base64 encoded string
|
|
|
|
# template:
|
|
|
|
template:
|
|
|
|
# src: "b64_latin1_template.j2"
|
|
|
|
src: "b64_latin1_template.j2"
|
|
|
|
# dest: "{{ output_dir }}/b64_latin1_template.txt"
|
|
|
|
dest: "{{ output_dir }}/b64_latin1_template.txt"
|
|
|
|
#
|
|
|
|
|
|
|
|
#- name: Check that what was written matches
|
|
|
|
- name: Check that what was written matches
|
|
|
|
# stat:
|
|
|
|
stat:
|
|
|
|
# path: "{{ output_dir }}/b64_latin1_template.txt"
|
|
|
|
path: "{{ output_dir }}/b64_latin1_template.txt"
|
|
|
|
# register: results
|
|
|
|
register: results
|
|
|
|
#
|
|
|
|
|
|
|
|
#- assert:
|
|
|
|
- assert:
|
|
|
|
# that:
|
|
|
|
that:
|
|
|
|
# - 'results.stat.checksum == b64_latin1.stat.checksum'
|
|
|
|
- 'results.stat.checksum == b64_latin1.stat.checksum'
|
|
|
|
|
|
|
|
|
|
|
|
# These might give garbled output but none of them should traceback
|
|
|
|
# These might give garbled output but none of them should traceback
|
|
|
|
- debug: var=simple_accents
|
|
|
|
- debug: var=simple_accents
|
|
|
|
- debug: msg={{ utf8_simple_accents|b64decode}}
|
|
|
|
- debug: msg={{ utf8_simple_accents|b64decode}}
|
|
|
|
#- debug: msg={{ latin1_simple_accents|b64decode}}
|
|
|
|
- debug: msg={{ latin1_simple_accents|b64decode}}
|
|
|
|