mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix proxmox update when setting does not already exist (#7872)
* fix proxmox update when setting does not already exist * add changelog fragment --------- Co-authored-by: Eric Trombly <etrombly@iomaxis.com>
This commit is contained in:
parent
13e3161f2a
commit
2d3f99ec3a
2 changed files with 6 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- proxmox - fix updating a container config if the setting does not already exist (https://github.com/ansible-collections/community.general/pull/7872).
|
|
@ -562,6 +562,10 @@ class ProxmoxLxcAnsible(ProxmoxAnsible):
|
|||
# compare the requested config against the current
|
||||
update_config = False
|
||||
for (arg, value) in kwargs.items():
|
||||
# if the arg isn't in the current config, it needs to be updated
|
||||
if arg not in current_config:
|
||||
update_config = True
|
||||
break
|
||||
# some values are lists, the order isn't always the same, so split them and compare by key
|
||||
if isinstance(value, str):
|
||||
current_values = current_config[arg].split(",")
|
||||
|
|
Loading…
Reference in a new issue