1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-17 17:31:31 +00:00
community.general/tests/integration/targets/archive/tests/broken-link.yml
patchback[bot] 6ca3e78d11
archive - adding dest_state return value and enhancing integration tests. (#2913) (#2973)
* Initial commit

* Adding changelog fragment

* fixing changelog fragment

* Updating documentation

* Applying review suggestions

(cherry picked from commit 288fe1cfc6)

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-07-10 13:19:53 +02:00

31 lines
898 B
YAML

---
- block:
- name: Create link - broken link ({{ format }})
file:
src: /nowhere
dest: "{{ output_dir }}/nowhere.txt"
state: link
force: yes
- name: Archive - broken link ({{ format }})
archive:
path: "{{ output_dir }}/*.txt"
dest: "{{ output_dir }}/archive_broken_link.{{ format }}"
format: "{{ format }}"
- name: Verify archive exists - broken link ({{ format }})
file:
path: "{{ output_dir }}/archive_broken_link.{{ format }}"
state: file
- name: Remove archive - broken link ({{ format }})
file:
path: "{{ output_dir }}/archive_broken_link.{{ format }}"
state: absent
- name: Remove link - broken link ({{ format }})
file:
path: "{{ output_dir }}/nowhere.txt"
state: absent
# 'zip' does not support symlink's
when: format != 'zip'