mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
win_unzip: added support for Server core by using .net zip functions (#29272)
* win_unzip: added support for Server core by using .net zip functions * fixed unzip behaviour with folders
This commit is contained in:
parent
5e978b0f2b
commit
5623e679b8
2 changed files with 82 additions and 16 deletions
|
@ -4,12 +4,26 @@
|
|||
dest: C:\Program Files\sysinternals
|
||||
register: unzip_archive
|
||||
|
||||
- name: Test unzip_archive
|
||||
- name: get stat of an extracted file
|
||||
win_stat:
|
||||
path: C:\Program Files\sysinternals\procexp.exe
|
||||
register: unzip_archive_file
|
||||
|
||||
- name: Test unzip_archive (check-mode)
|
||||
assert:
|
||||
that:
|
||||
- unzip_archive|changed == true
|
||||
- unzip_archive.removed == false
|
||||
- unzip_archive_file.stat.exists == false
|
||||
when: in_check_mode
|
||||
|
||||
- name: Test unzip_archive (normal mode)
|
||||
assert:
|
||||
that:
|
||||
- unzip_archive|changed == true
|
||||
- unzip_archive.removed == false
|
||||
- unzip_archive_file.stat.exists == true
|
||||
when: not in_check_mode
|
||||
|
||||
- name: Unarchive sysinternals archive again, use creates
|
||||
win_unzip:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue