diff --git a/changelogs/fragments/1914-add-sanitization-to-url.yml b/changelogs/fragments/1914-add-sanitization-to-url.yml new file mode 100644 index 0000000000..3b41bcb7af --- /dev/null +++ b/changelogs/fragments/1914-add-sanitization-to-url.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - proxmox inventory - added handling of extra trailing slashes in the URL (https://github.com/ansible-collections/community.general/pull/1914). diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py index ead09b41b0..428e58a703 100644 --- a/plugins/inventory/proxmox.py +++ b/plugins/inventory/proxmox.py @@ -338,7 +338,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable): self._read_config_data(path) # get connection host - self.proxmox_url = self.get_option('url') + self.proxmox_url = self.get_option('url').rstrip('/') self.proxmox_user = self.get_option('user') self.proxmox_password = self.get_option('password') self.cache_key = self.get_cache_key(path)