proxmox inventory: remove duplicated credentials line (#8917)

* proxmox inventory: remove duplicated credentials line

* fixup! proxmox inventory: remove duplicated credentials line

* fixup! proxmox inventory: remove duplicated credentials line
pull/8922/head
Per Fide 2024-09-25 12:54:46 +02:00 committed by GitHub
parent 199ba0a170
commit 89ad40db41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1,2 @@
minor_changes:
- proxmox inventory plugin - clean up authentication code (https://github.com/ansible-collections/community.general/pull/8917).

View File

@ -275,11 +275,10 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
return self.session
def _get_auth(self):
credentials = urlencode({'username': self.proxmox_user, 'password': self.proxmox_password, })
if self.proxmox_password:
credentials = urlencode({'username': self.proxmox_user, 'password': self.proxmox_password, })
credentials = urlencode({'username': self.proxmox_user, 'password': self.proxmox_password})
a = self._get_session()