From 07c880448699a53c35701bfb148a41c6259ce581 Mon Sep 17 00:00:00 2001 From: neo Date: Fri, 10 Jun 2016 17:35:08 -0400 Subject: [PATCH] fix unarchive doesn't extract changed tar file #3901 --- lib/ansible/modules/files/unarchive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index af9891a008f..f79e8904ec2 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -132,6 +132,7 @@ import subprocess OWNER_DIFF_RE = re.compile(r': Uid differs$') GROUP_DIFF_RE = re.compile(r': Gid differs$') MODE_DIFF_RE = re.compile(r': Mode differs$') +MOD_TIME_DIFF_RE = re.compile(r': Mod time differs$') #NEWER_DIFF_RE = re.compile(r' is newer or same age.$') MISSING_FILE_RE = re.compile(r': Warning: Cannot stat: No such file or directory$') ZIP_FILE_MODE_RE = re.compile(r'([r-][w-][stx-]){3}') @@ -598,6 +599,8 @@ class TgzArchive(object): out += line + '\n' if not self.file_args['mode'] and MODE_DIFF_RE.search(line): out += line + '\n' + if MOD_TIME_DIFF_RE.search(line): + out += line + '\n' if MISSING_FILE_RE.search(line): out += line + '\n' if out: