diff options
author | Brian Coca <bcoca@ansible.com> | 2014-11-18 14:59:11 -0500 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2014-11-18 14:59:11 -0500 |
commit | ee39fd8df0926d3a81ced5567828e058e88fc382 (patch) | |
tree | b90738ac77bbea5b0c1bd76024e88b9b1094e2ab | |
parent | d868b6d366f4f66b53f13938e87189ce2f2e7a78 (diff) | |
parent | 9e0565e58f02cbea8731fe2acd0484d92cd601ae (diff) | |
download | ansible-modules-core-ee39fd8df0926d3a81ced5567828e058e88fc382.tar.gz |
Merge pull request #124 from jonhadfield/remove-unused-creates
Remove redundant check for creates argument.
-rw-r--r-- | files/unarchive.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/files/unarchive.py b/files/unarchive.py index b632aff3..f46e52e0 100644 --- a/files/unarchive.py +++ b/files/unarchive.py @@ -193,7 +193,6 @@ def main(): src = os.path.expanduser(module.params['src']) dest = os.path.expanduser(module.params['dest']) copy = module.params['copy'] - creates = module.params['creates'] # did tar file arrive? if not os.path.exists(src): @@ -204,20 +203,6 @@ def main(): if not os.access(src, os.R_OK): module.fail_json(msg="Source '%s' not readable" % src) - if creates: - # do not run the command if the line contains creates=filename - # and the filename already exists. This allows idempotence - # of command executions. - v = os.path.expanduser(creates) - if os.path.exists(v): - module.exit_json( - stdout="skipped, since %s exists" % v, - skipped=True, - changed=False, - stderr=False, - rc=0 - ) - # is dest OK to receive tar file? if not os.path.isdir(dest): module.fail_json(msg="Destination '%s' is not a directory" % dest) |