diff --git a/changelogs/fragments/unarchive_fix.yml b/changelogs/fragments/unarchive_fix.yml new file mode 100644 index 00000000000..dd5e35d7865 --- /dev/null +++ b/changelogs/fragments/unarchive_fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - unarchive modules now uses zipinfo options without relying on implementation defaults, making it more compatible with all OS/distributions. diff --git a/lib/ansible/modules/unarchive.py b/lib/ansible/modules/unarchive.py index 0fbdc1d643e..bb10e3333ec 100644 --- a/lib/ansible/modules/unarchive.py +++ b/lib/ansible/modules/unarchive.py @@ -978,7 +978,7 @@ class TarZstdArchive(TgzArchive): class ZipZArchive(ZipArchive): def __init__(self, src, b_dest, file_args, module): super(ZipZArchive, self).__init__(src, b_dest, file_args, module) - self.zipinfoflag = '-Z' + self.zipinfoflag = '-Zl' self.binaries = ( ('unzip', 'cmd_path'), ('unzip', 'zipinfo_cmd_path'),