summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2016-09-09 15:27:38 +0200
committerBrian Coca <bcoca@users.noreply.github.com>2016-09-09 09:27:38 -0400
commit1df924e1d55f12f684c835bcd404c89053693022 (patch)
tree9f15424a3fe969f427c4d6a65bc6bd94d9f35c1a
parentf5a4677680808d74f2b4a31bcc54377adb2a5cfb (diff)
downloadansible-1df924e1d55f12f684c835bcd404c89053693022.tar.gz
Clean up unarchive action plugin (#17429)
-rw-r--r--lib/ansible/plugins/action/unarchive.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ansible/plugins/action/unarchive.py b/lib/ansible/plugins/action/unarchive.py
index 70cde2e97d..3966984d62 100644
--- a/lib/ansible/plugins/action/unarchive.py
+++ b/lib/ansible/plugins/action/unarchive.py
@@ -67,9 +67,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.
- result = self._execute_module(module_name='stat', module_args=dict(path=creates), task_vars=task_vars)
- stat = result.get('stat', None)
- if stat and stat.get('exists', False):
+ if self._remote_file_exists(creates):
result['skipped'] = True
result['msg'] = "skipped, since %s exists" % creates
self._remove_tmp_path(tmp)