Fix ansible-test tar format handling.

This commit is contained in:
Matt Clay 2020-01-29 18:21:49 -08:00
parent 4fd2dce7f3
commit 49d8d5ae33
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test now uses GNU tar format instead of the Python default when creating payloads for remote systems

View file

@ -97,7 +97,7 @@ def create_payload(args, dst_path): # type: (CommonConfig, str) -> None
start = time.time() start = time.time()
with tarfile.TarFile.gzopen(dst_path, mode='w', compresslevel=4) as tar: with tarfile.TarFile.open(dst_path, mode='w:gz', compresslevel=4, format=tarfile.GNU_FORMAT) as tar:
for src, dst in files: for src, dst in files:
display.info('%s -> %s' % (src, dst), verbosity=4) display.info('%s -> %s' % (src, dst), verbosity=4)
tar.add(src, dst, filter=filters.get(dst)) tar.add(src, dst, filter=filters.get(dst))