ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
787 stars 1.45k forks source link

Add uncompress module #1042

Open J0WI opened 3 years ago

J0WI commented 3 years ago

Moving this from https://github.com/ansible/ansible/pull/23048

SUMMARY

Add uncompress module, for people who wish to uncompress things like .gz or .bz2 or .xz which are not archives, and would not be appropriate for the unarchive module.

ISSUE TYPE
COMPONENT NAME

uncompress

ansibullbot commented 3 years ago

Files identified in the description: None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

Warkdev commented 1 year ago

Is this issue still relevant ? It seems that this is already handled somewhere else: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html#notes

felixfontein commented 1 year ago

unarchive is extracting archives. An uncompress module would uncompress files. That's something else. (For example uncompress would convert a .tar.gz file to a .gz file, while unarchive would extract the tarball.)

J0WI commented 1 year ago

(For example uncompress would convert a .tar.gz file to a .gz file, while unarchive would extract the tarball.)

* .tar

This is useful for .img.gz, .sql.gz, .json.gz etc. where you just have a single compressed file without any tarball wrapper.

kagehisa commented 1 week ago

It would really be helpful. At the moment the only way of unpacking a zipped file is via the command module. I would expect Ansible to be able to handle a zipped file. This seems to be an issue since 2016.

felixfontein commented 1 week ago

@kagehisa Ansible has been able to extract ZIP archives for a long time, see the ansible.builtin.unarchive module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html#notes

This issue is about uncompressing files, not about extracting archives.

kagehisa commented 1 week ago

Ok I don't want to spark the same discussions aubout semantics as in the previous issues for the unarchive module. I'm talking about a zipped file in the context of compression. So taking something.bz2/.gz/.xz and making it to something. What this something is should not matter.