Skip to content

Commit

Permalink
Attempt at fixing (ansible#64016)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Cartwright committed Nov 8, 2019
1 parent 872e92f commit e55e4b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/modules/net_tools/basics/get_url.py
Expand Up @@ -529,6 +529,7 @@ def main():
module.fail_json(msg='The checksum format is invalid', **result)

if not dest_is_dir and os.path.exists(dest):
# should start with checksum_match = False for more clarity
checksum_match = True

if not force:
Expand All @@ -542,7 +543,7 @@ def main():

# Not forcing redownload, unless checksum does not match
# allow file attribute changes
if checksum and checksum_match:
if (checksum and checksum_match) or not checksum:
module.params['path'] = dest
file_args = module.load_file_common_arguments(module.params)
file_args['path'] = dest
Expand Down

0 comments on commit e55e4b8

Please sign in to comment.