xezpeleta/Ansible-Proxmox-inventory

http error 401: authentication failure

Duck-dave opened this issue · 1 comments

Hi,
i get the error message:

[duckdave@arch ansible]$ python ~/ansible/proxmox.py --list --pretty
Traceback (most recent call last):
File "/home/duckdave/ansible/proxmox.py", line 345, in
main()
File "/home/duckdave/ansible/proxmox.py", line 330, in main
data = main_list(options, config_path)
File "/home/duckdave/ansible/proxmox.py", line 209, in main_list
proxmox_api.auth()
File "/home/duckdave/ansible/proxmox.py", line 143, in auth
data = json.load(open_url(request_path, data=request_params,
File "/usr/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1384, in open_url
return Request().open(method, url, data=data, headers=headers, use_proxy=use_proxy,
File "/usr/lib/python3.8/site-packages/ansible/module_utils/urls.py", line 1294, in open
r = urllib_request.urlopen(*urlopen_args)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: authentication failure`

I entered the credentials of my root user in the json file.
Using Proxmox VE 6.1-5
Best Regards David

found it, username needs the domain like root@pam