Skip to content

Commit

Permalink
Updated get_url module to process FTP results correctly [ansible#3661]
Browse files Browse the repository at this point in the history
  • Loading branch information
afunix committed Aug 30, 2016
1 parent c6c281b commit 0e9b99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network/basics/get_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def url_get(module, url, dest, use_proxy, last_mod_time, force, timeout=10, head
module.exit_json(url=url, dest=dest, changed=False, msg=info.get('msg', ''))

# create a temporary file and copy content to do checksum-based replacement
if info['status'] != 200 and not url.startswith('file:/'):
if info['status'] != 200 and not url.startswith('file:/') and not (url.startswith('ftp:/') and info.get('msg', '').startswith('OK')):
module.fail_json(msg="Request failed", status_code=info['status'], response=info['msg'], url=url, dest=dest)

if tmp_dest != '':
Expand Down

0 comments on commit 0e9b99f

Please sign in to comment.