-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unarchive: add support for .tar.zst (zstd compression)
- Loading branch information
Showing
5 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- Add support in the unarchive module for .tar.zst (zstd compression) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Only do this whole file when the "zstd" executable is present | ||
- when: | ||
- zstd_available.rc == 0 | ||
- gnu_tar.stdout != "" | ||
block: | ||
- name: create our tar.zst unarchive destination | ||
file: | ||
path: '{{remote_tmp_dir}}/test-unarchive-tar-zst' | ||
state: directory | ||
|
||
- name: unarchive a tar.zst file | ||
unarchive: | ||
src: '{{remote_tmp_dir}}/test-unarchive.tar.zst' | ||
dest: '{{remote_tmp_dir}}/test-unarchive-tar-zst' | ||
remote_src: yes | ||
register: unarchive02 | ||
|
||
- name: verify that the file was marked as changed | ||
assert: | ||
that: | ||
- "unarchive02.changed == true" | ||
# Verify that no file list is generated | ||
- "'files' not in unarchive02" | ||
|
||
- name: verify that the file was unarchived | ||
file: | ||
path: '{{remote_tmp_dir}}/test-unarchive-tar-zst/foo-unarchive.txt' | ||
state: file | ||
|
||
- name: remove our tar.zst unarchive destination | ||
file: | ||
path: '{{remote_tmp_dir}}/test-unarchive-tar-zst' | ||
state: absent | ||
|
||
- name: test owner/group perms | ||
include_tasks: test_owner_group.yml | ||
vars: | ||
ext: tar.zst | ||
archive: test-unarchive.tar.zst | ||
testfile: foo-unarchive.txt |