From 89ad40db4181d88dd4c8e7d68237f7a4a7e61bb4 Mon Sep 17 00:00:00 2001 From: Per Fide Date: Wed, 25 Sep 2024 12:54:46 +0200 Subject: [PATCH] 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 --- changelogs/fragments/8917-proxmox-clean-auth.yml | 2 ++ plugins/inventory/proxmox.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/8917-proxmox-clean-auth.yml 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()