mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix up vsphere_copy after open_url change
* Remove leading module parameter on open_url call as it's no longer used by module_utils.urls.open_url * Force basic auth otherwise vsphere will just return a 401
This commit is contained in:
parent
33ee8d6f89
commit
d24f02fd39
1 changed files with 3 additions and 2 deletions
|
@ -137,8 +137,9 @@ def main():
|
|||
}
|
||||
|
||||
try:
|
||||
r = open_url(module, url, data=data, headers=headers, method='PUT',
|
||||
url_username=login, url_password=password, validate_certs=validate_certs)
|
||||
r = open_url(url, data=data, headers=headers, method='PUT',
|
||||
url_username=login, url_password=password, validate_certs=validate_certs,
|
||||
force_basic_auth=True)
|
||||
except socket.error, e:
|
||||
if isinstance(e.args, tuple) and e[0] == errno.ECONNRESET:
|
||||
# VSphere resets connection if the file is in use and cannot be replaced
|
||||
|
|
Loading…
Reference in a new issue