From 779d05aec413cf775bc9a388e7ac1fffad7e54d7 Mon Sep 17 00:00:00 2001 From: Andreas Olsson Date: Wed, 19 Jul 2017 02:39:42 +0200 Subject: [PATCH] Support tilde (~) paths for unarchive creates tests This expands the value of the creates parameter the same way which the value of the dest parameter is already being expanded. Fixes #26965 --- lib/ansible/plugins/action/unarchive.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/plugins/action/unarchive.py b/lib/ansible/plugins/action/unarchive.py index 2dfd0c32cd..1a1464debe 100644 --- a/lib/ansible/plugins/action/unarchive.py +++ b/lib/ansible/plugins/action/unarchive.py @@ -66,6 +66,7 @@ class ActionModule(ActionBase): # do not run the command if the line contains creates=filename # and the filename already exists. This allows idempotence # of command executions. + creates = self._remote_expand_user(creates) if self._remote_file_exists(creates): result['skipped'] = True result['msg'] = "skipped, since %s exists" % creates