diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-01-26 09:45:59 -0800 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2015-02-17 14:47:35 -0600 |
commit | 742715064e2d3461dcc12cd0995d72f7b5559542 (patch) | |
tree | a807bc9752527788704f0fc791952872e4a887f6 | |
parent | 3732a8244d3af584d37caa49ee825b7bcdbdb0cf (diff) | |
download | ansible-modules-core-742715064e2d3461dcc12cd0995d72f7b5559542.tar.gz |
Prefer gtar to tar
Fixes #702
-rw-r--r-- | files/unarchive.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/files/unarchive.py b/files/unarchive.py index f46e52e0..9b990def 100644 --- a/files/unarchive.py +++ b/files/unarchive.py @@ -112,7 +112,11 @@ class TgzFile(object): self.src = src self.dest = dest self.module = module - self.cmd_path = self.module.get_bin_path('tar') + # Prefer gtar (GNU tar) as it supports the compression options -zjJ + self.cmd_path = self.module.get_bin_path('gtar', None) + if not self.cmd_path: + # Fallback to tar + self.cmd_path = self.module.get_bin_path('tar') self.zipflag = 'z' def is_unarchived(self): |