archive: Fix paramater types (#1039)

* archive: Fix ignored sanity test parameter-list-no-elements

* Fix wrong argument type

* Add changelog

* Add integration test for a list of files
This commit is contained in:
Amin Vakil 2020-11-24 10:41:36 +03:30 committed by GitHub
commit 31443e57b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 17 deletions

View file

@ -256,6 +256,29 @@
- name: remove our xz
file: path="{{ output_dir }}/archive_02.xz" state=absent
- name: archive multiple files as list
archive:
path:
- "{{ output_dir }}/empty.txt"
- "{{ output_dir }}/foo.txt"
- "{{ output_dir }}/bar.txt"
dest: "{{ output_dir }}/archive_list.gz"
format: gz
register: archive_gz_list_result
- name: verify that the files archived
file: path={{output_dir}}/archive_list.gz state=file
- name: check if gz file exists and includes all text files
assert:
that:
- "{{ archive_gz_list_result.changed }}"
- "{{ 'archived' in archive_gz_list_result }}"
- "{{ archive_gz_list_result['archived'] | length }} == 3"
- name: remove our gz
file: path="{{ output_dir }}/archive_list.gz" state=absent
- name: test that gz archive that contains non-ascii filenames
archive:
path: "{{ output_dir }}/*.txt"