Files
community.general/plugins/modules
patchback[bot] bbd67b5017 [PR #9175/41b6a281 backport][stable-10] Add decompress module (#9213)
Add decompress module (#9175)

* adds simple implementation of `decompress` module

* adds simple test, fixes src and dest arg types

* minor refactoring

* adds support for common file operations
adds integration test for gz decompressing

* makes tests parametrized to test all supported compression formats

* checks that target file exists

* writes to decompressed file now uses atomic_move

* adds idempotency for decompression

* refactoring, removed classes

* adds support for check mode

* adds check for destination file. If it exists and it is a directory, the module returns error

* refactoring, moves code to a class. Also, simplifies tests (now only tests related to the module core functionality run as parametrized, tests for idempotency and check mode run only for one format)

* adds 'remove' parameter that deletes original compressed file after decompression

* adds documentation

* fixes bug with 'remove' parameter in check mode

* makes dest argument not required. Dest filename now can be produced from the src filename

* adds dest to output

* updates the documentation, adds "RETURN" block

* fixes test

* adds support for python2

* removes some of the test files that can be generated during testing. Adds copyright header to test files

* adds maintainer

* apply minor suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* fixes code review comments (idempotency issue with non existing src, existing dest and remove=true; fixes the issue and adds test)

* refactors the module to use ModuleHelper

* refactors lzma dependency manual check to use 'deps.validate'

* minor fix

* removes registered handlers check

* minor refactoring

* adds aliases

* changes setup for tests

* tests: ignores macos and fixes tests for FreeBSD

* tests: reverts ignore for macos and fixes issue with centos7

* tests: adds liblzma dependency for python2

* tests: adds backports.lzma

* fixes bz2 decompression for python2

* tests: install xz for osx

* tests: install xz for osx (2)

* fixes code review comments

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 41b6a281e1)

Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
2024-12-02 20:34:01 +01:00
..
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2024-10-22 20:05:46 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-07-11 18:28:34 +12:00
2024-09-24 22:53:16 +03:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2023-10-25 23:01:32 +02:00
2023-10-25 23:01:32 +02:00
2023-10-25 23:01:32 +02:00
2023-10-25 23:01:32 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2024-07-23 17:18:41 +02:00
2023-11-22 22:45:28 +01:00
2024-09-25 22:02:33 +03:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-07-14 07:03:34 +02:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2024-09-22 13:09:36 +03:00
2023-10-25 23:01:32 +02:00
2023-10-04 19:48:54 +02:00
2023-09-06 19:11:43 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2024-07-23 17:18:41 +02:00
2023-06-20 08:14:02 +02:00
2023-12-03 13:51:39 +01:00
2024-09-21 10:31:50 +03:00
2023-11-22 22:45:28 +01:00
2024-10-10 22:02:51 +02:00
2024-10-21 20:51:57 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2024-11-02 17:49:54 +01:00
2023-10-25 23:01:32 +02:00
2023-10-25 23:01:32 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2024-04-20 09:26:08 +02:00
2023-11-22 22:45:28 +01:00
2023-10-25 23:01:32 +02:00
2023-02-04 17:05:08 +01:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2024-07-23 18:01:37 +02:00
2023-10-25 23:01:32 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2024-10-13 12:08:11 +02:00
2023-10-29 18:04:44 +01:00
2023-10-25 23:01:32 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2023-10-29 18:04:44 +01:00
2023-06-20 08:14:02 +02:00
2023-10-25 23:01:32 +02:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-11-22 22:45:28 +01:00
2023-06-20 08:14:02 +02:00
2023-10-25 23:01:32 +02:00
2024-09-17 17:57:47 +12:00
2023-06-20 08:14:02 +02:00
2023-11-22 22:45:28 +01:00
2023-10-25 22:05:37 +02:00