mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-29 06:43:08 +00:00
Proxmox inventory: Add some sanitization to url parameter (#1914)
* Added rstrip to the URL field to prevent issues when users add a trailing / in the config of this module * Added changelog fragment * Sorry Mr. Linter, I have removed the empty line :-) * Fixed punctuation * Fixed punctuation
This commit is contained in:
3
changelogs/fragments/1914-add-sanitization-to-url.yml
Normal file
3
changelogs/fragments/1914-add-sanitization-to-url.yml
Normal file
@@ -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).
|
||||
@@ -352,7 +352,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)
|
||||
|
||||
Reference in New Issue
Block a user