From 0380006e0013a6bf8bbe71a9d0263d181b368a84 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Wed, 1 Jun 2016 09:07:18 -0400 Subject: [PATCH] expanduser() on dest --- lib/ansible/modules/extras/files/archive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/files/archive.py b/lib/ansible/modules/extras/files/archive.py index 26394b03ad2..96658461e9a 100644 --- a/lib/ansible/modules/extras/files/archive.py +++ b/lib/ansible/modules/extras/files/archive.py @@ -157,7 +157,9 @@ def main(): # Default created file name (for single-file archives) to # . - if not archive and not dest: + if dest: + dest = os.path.expanduser(dest) + elif not archive: dest = '%s.%s' % (expanded_paths[0], compression) # Force archives to specify 'dest'