You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Report
Getting below error
The full traceback is:
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 172, in main
r = open_url(url, data=data, headers=headers, method='PUT', timeout=timeout,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1686, in open_url
return Request().open(method, url, data=data, headers=headers, use_proxy=use_proxy,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1578, in open
r = urllib_request.urlopen(request, None, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 521, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 630, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 559, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 639, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
fatal: [localhost]: FAILED! => changed=false
invocation:
module_args:
datacenter: Cap America
datastore: Store-Silver-01
hostname: domain.com
password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
path: /Folder1/README.md
port: 443
proxy_host: null
proxy_port: null
src: /servers/README.md
timeout: 300
username: CODE1\ing07471
validate_certs: false
msg: 'HTTP Error 404: Not Found'
NO MORE HOSTS LEFT ******************************************************************************************************************************************
SUMMARY
When trying to upload file from local to data store by using below ansible snippet
community.vmware.vsphere_copy:
hostname: 'domain.com'
username: 'CODE1*'
password: '*'
src: '/servers/README.md'
datacenter: 'Cap America'
datastore: 'Store-Silver-01'
path: "/Folder1/README.md"
validate_certs: False
timeout: 300
delegate_to: localhost
ISSUE TYPE
Getting below error
The full traceback is:
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 172, in main
r = open_url(url, data=data, headers=headers, method='PUT', timeout=timeout,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1686, in open_url
return Request().open(method, url, data=data, headers=headers, use_proxy=use_proxy,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_community.vmware.vsphere_copy_payload_sdozi01a/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1578, in open
r = urllib_request.urlopen(request, None, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 521, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 630, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 559, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib64/python3.12/urllib/request.py", line 639, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
fatal: [localhost]: FAILED! => changed=false
invocation:
module_args:
datacenter: Cap America
datastore: Store-Silver-01
hostname: domain.com
password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
path: /Folder1/README.md
port: 443
proxy_host: null
proxy_port: null
src: /servers/README.md
timeout: 300
username: CODE1\ing07471
validate_certs: false
msg: 'HTTP Error 404: Not Found'
NO MORE HOSTS LEFT ******************************************************************************************************************************************
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=5 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
COMPONENT NAME
community.vmware.vsphere_copy:
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
RHEL 8
STEPS TO REPRODUCE
Suspect in Datacenter name with Space
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: