From 621b18c6efdc7f6deb6c4e58b3c9a64ba42b339c Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 12 Aug 2015 22:50:30 -0400 Subject: [PATCH] fixed source path discovery for unarchive in roles fixes #11943 --- lib/ansible/plugins/action/unarchive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/unarchive.py b/lib/ansible/plugins/action/unarchive.py index 6a43259763e..63ab6c549cc 100644 --- a/lib/ansible/plugins/action/unarchive.py +++ b/lib/ansible/plugins/action/unarchive.py @@ -61,7 +61,10 @@ class ActionModule(ActionBase): if '_original_file' in task_vars: source = self._loader.path_dwim_relative(task_vars['_original_file'], 'files', source) else: - source = self._loader.path_dwim(source) + if self._task._role is not None: + source = self._loader.path_dwim_relative(self._task._role._role_path, 'files', source) + else: + source = self._loader.path_dwim(source) remote_checksum = self._remote_checksum(tmp, dest) if remote_checksum != '3':