diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index c2a75842bb..922adb45cc 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -733,7 +733,7 @@ def main(): file_args = module.load_file_common_arguments(module.params) # did tar file arrive? if not os.path.exists(src): - if not remote_src or copy: + if not remote_src and copy: module.fail_json(msg="Source '%s' failed to transfer" % src) # If copy=false, and src= contains ://, try and download the file to a temp directory. elif '://' in src: