|
|
@ -68,11 +68,12 @@
|
|
|
|
when: ansible_python_version.split('.')[0] == '2'
|
|
|
|
when: ansible_python_version.split('.')[0] == '2'
|
|
|
|
register: backports_lzma_pip
|
|
|
|
register: backports_lzma_pip
|
|
|
|
|
|
|
|
|
|
|
|
- name: prep our file
|
|
|
|
- name: prep our files
|
|
|
|
copy: src={{ item }} dest={{output_dir}}/{{ item }}
|
|
|
|
copy: src={{ item }} dest={{output_dir}}/{{ item }}
|
|
|
|
with_items:
|
|
|
|
with_items:
|
|
|
|
- foo.txt
|
|
|
|
- foo.txt
|
|
|
|
- bar.txt
|
|
|
|
- bar.txt
|
|
|
|
|
|
|
|
- empty.txt
|
|
|
|
|
|
|
|
|
|
|
|
- name: archive using gz
|
|
|
|
- name: archive using gz
|
|
|
|
archive:
|
|
|
|
archive:
|
|
|
@ -86,12 +87,12 @@
|
|
|
|
- name: verify that the files archived
|
|
|
|
- name: verify that the files archived
|
|
|
|
file: path={{output_dir}}/archive_01.gz state=file
|
|
|
|
file: path={{output_dir}}/archive_01.gz state=file
|
|
|
|
|
|
|
|
|
|
|
|
- name: check if gz file exists
|
|
|
|
- name: check if gz file exists and includes all text files
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "{{ archive_gz_result_01.changed }}"
|
|
|
|
- "{{ archive_gz_result_01.changed }}"
|
|
|
|
- "{{ 'archived' in archive_gz_result_01 }}"
|
|
|
|
- "{{ 'archived' in archive_gz_result_01 }}"
|
|
|
|
- "{{ archive_gz_result_01['archived'] | length }} == 2"
|
|
|
|
- "{{ archive_gz_result_01['archived'] | length }} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: archive using zip
|
|
|
|
- name: archive using zip
|
|
|
|
archive:
|
|
|
|
archive:
|
|
|
@ -110,7 +111,7 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "{{ archive_zip_result_01.changed }}"
|
|
|
|
- "{{ archive_zip_result_01.changed }}"
|
|
|
|
- "{{ 'archived' in archive_zip_result_01 }}"
|
|
|
|
- "{{ 'archived' in archive_zip_result_01 }}"
|
|
|
|
- "{{ archive_zip_result_01['archived'] | length }} == 2"
|
|
|
|
- "{{ archive_zip_result_01['archived'] | length }} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: archive using bz2
|
|
|
|
- name: archive using bz2
|
|
|
|
archive:
|
|
|
|
archive:
|
|
|
@ -129,7 +130,7 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "{{ archive_bz2_result_01.changed }}"
|
|
|
|
- "{{ archive_bz2_result_01.changed }}"
|
|
|
|
- "{{ 'archived' in archive_bz2_result_01 }}"
|
|
|
|
- "{{ 'archived' in archive_bz2_result_01 }}"
|
|
|
|
- "{{ archive_bz2_result_01['archived'] | length }} == 2"
|
|
|
|
- "{{ archive_bz2_result_01['archived'] | length }} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: archive using xz
|
|
|
|
- name: archive using xz
|
|
|
|
archive:
|
|
|
|
archive:
|
|
|
@ -148,7 +149,7 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "{{ archive_xz_result_01.changed }}"
|
|
|
|
- "{{ archive_xz_result_01.changed }}"
|
|
|
|
- "{{ 'archived' in archive_xz_result_01 }}"
|
|
|
|
- "{{ 'archived' in archive_xz_result_01 }}"
|
|
|
|
- "{{ archive_xz_result_01['archived'] | length }} == 2"
|
|
|
|
- "{{ archive_xz_result_01['archived'] | length }} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: archive and set mode to 0600
|
|
|
|
- name: archive and set mode to 0600
|
|
|
|
archive:
|
|
|
|
archive:
|
|
|
@ -171,7 +172,7 @@
|
|
|
|
- "archive_02_gz_stat.changed == False "
|
|
|
|
- "archive_02_gz_stat.changed == False "
|
|
|
|
- "archive_02_gz_stat.stat.mode == '0600'"
|
|
|
|
- "archive_02_gz_stat.stat.mode == '0600'"
|
|
|
|
- "'archived' in archive_bz2_result_02"
|
|
|
|
- "'archived' in archive_bz2_result_02"
|
|
|
|
- "{{ archive_bz2_result_02['archived']| length}} == 2"
|
|
|
|
- "{{ archive_bz2_result_02['archived']| length}} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove our gz
|
|
|
|
- name: remove our gz
|
|
|
|
file: path="{{ output_dir }}/archive_02.gz" state=absent
|
|
|
|
file: path="{{ output_dir }}/archive_02.gz" state=absent
|
|
|
@ -196,7 +197,7 @@
|
|
|
|
- "archive_02_zip_stat.changed == False"
|
|
|
|
- "archive_02_zip_stat.changed == False"
|
|
|
|
- "archive_02_zip_stat.stat.mode == '0600'"
|
|
|
|
- "archive_02_zip_stat.stat.mode == '0600'"
|
|
|
|
- "'archived' in archive_zip_result_02"
|
|
|
|
- "'archived' in archive_zip_result_02"
|
|
|
|
- "{{ archive_zip_result_02['archived']| length}} == 2"
|
|
|
|
- "{{ archive_zip_result_02['archived']| length}} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove our zip
|
|
|
|
- name: remove our zip
|
|
|
|
file: path="{{ output_dir }}/archive_02.zip" state=absent
|
|
|
|
file: path="{{ output_dir }}/archive_02.zip" state=absent
|
|
|
@ -221,7 +222,7 @@
|
|
|
|
- "archive_02_bz2_stat.changed == False"
|
|
|
|
- "archive_02_bz2_stat.changed == False"
|
|
|
|
- "archive_02_bz2_stat.stat.mode == '0600'"
|
|
|
|
- "archive_02_bz2_stat.stat.mode == '0600'"
|
|
|
|
- "'archived' in archive_bz2_result_02"
|
|
|
|
- "'archived' in archive_bz2_result_02"
|
|
|
|
- "{{ archive_bz2_result_02['archived']| length}} == 2"
|
|
|
|
- "{{ archive_bz2_result_02['archived']| length}} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove our bz2
|
|
|
|
- name: remove our bz2
|
|
|
|
file: path="{{ output_dir }}/archive_02.bz2" state=absent
|
|
|
|
file: path="{{ output_dir }}/archive_02.bz2" state=absent
|
|
|
@ -245,7 +246,7 @@
|
|
|
|
- "archive_02_xz_stat.changed == False"
|
|
|
|
- "archive_02_xz_stat.changed == False"
|
|
|
|
- "archive_02_xz_stat.stat.mode == '0600'"
|
|
|
|
- "archive_02_xz_stat.stat.mode == '0600'"
|
|
|
|
- "'archived' in archive_xz_result_02"
|
|
|
|
- "'archived' in archive_xz_result_02"
|
|
|
|
- "{{ archive_xz_result_02['archived']| length}} == 2"
|
|
|
|
- "{{ archive_xz_result_02['archived']| length}} == 3"
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove our xz
|
|
|
|
- name: remove our xz
|
|
|
|
file: path="{{ output_dir }}/archive_02.xz" state=absent
|
|
|
|
file: path="{{ output_dir }}/archive_02.xz" state=absent
|
|
|
|