From 12628ed7e538e9c074a026240744ab9c46954797 Mon Sep 17 00:00:00 2001 From: sirkubax Date: Tue, 17 Jan 2017 03:05:54 +0100 Subject: [PATCH] fix https://github.com/ansible/ansible/issues/20183 (#20217) * fix https://github.com/ansible/ansible/issues/20183 * make it nicer --- lib/ansible/modules/files/unarchive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index 0f287f6fae8..ac11346ae68 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -555,9 +555,10 @@ class ZipArchive(object): return dict(unarchived=unarchived, rc=rc, out=out, err=err, cmd=cmd, diff=diff) def unarchive(self): - cmd = [ self.cmd_path, '-o', self.src ] + cmd = [ self.cmd_path, '-o' ] if self.opts: cmd.extend(self.opts) + cmd.append(self.src) # NOTE: Including (changed) files as arguments is problematic (limits on command line/arguments) # if self.includes: # NOTE: Command unzip has this strange behaviour where it expects quoted filenames to also be escaped