1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #5602/632fc07e backport][stable-5] Updated tags delimiter (#5651)

Updated tags delimiter (#5602)

* Updated tags delimiter

Starting from Proxmox 7.3 tags are delimited by semicolon. For backward compatibility it needs to be splitted by both commas and semicolons.

* Added missing space

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 632fc07e65)

Co-authored-by: domelek <40233039+domelek@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2022-12-04 12:57:21 +01:00 committed by GitHub
parent 0273420e70
commit ac5bbe666e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "proxmox inventory plugin - handle tags delimited by semicolon instead of comma, which happens from Proxmox 7.3 on (https://github.com/ansible-collections/community.general/pull/5602)."

View file

@ -410,7 +410,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
stripped_value = value.strip() stripped_value = value.strip()
if stripped_value: if stripped_value:
parsed_key = key + "_parsed" parsed_key = key + "_parsed"
properties[parsed_key] = [tag.strip() for tag in stripped_value.split(",")] properties[parsed_key] = [tag.strip() for tag in stripped_value.replace(',', ';').split(";")]
# The first field in the agent string tells you whether the agent is enabled # The first field in the agent string tells you whether the agent is enabled
# the rest of the comma separated string is extra config for the agent. # the rest of the comma separated string is extra config for the agent.