mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
When you try to remote unarchive files with the option copy=no the code always fail, as evidenced in issue #4202. That happens because the conditional to check "if remote_src=no or copy=yes" will always be true since the default value of them is remote_src=no and copy=yes. My modification is only to change the condition from or to and, that way only if both the vars stay with the default value will be true, otherwise you can unarchive remote files.
This commit is contained in:
parent
16ccde49ad
commit
6aeea1fe7e
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue