diff --git a/changelogs/fragments/8917-proxmox-clean-auth.yml b/changelogs/fragments/8917-proxmox-clean-auth.yml new file mode 100644 index 0000000000..0681f326a6 --- /dev/null +++ b/changelogs/fragments/8917-proxmox-clean-auth.yml @@ -0,0 +1,2 @@ +minor_changes: + - proxmox inventory plugin - clean up authentication code (https://github.com/ansible-collections/community.general/pull/8917). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index edfadfd8ad..d7e2107719 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -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()