mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Send string instead of boolean to proxmox api (#5198)
* Send string instead of boolean to proxmox api * Add changelog fragment. * Update plugins/modules/cloud/misc/proxmox_kvm.py Co-authored-by: castorsky <csky57@gmail.com> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: castorsky <csky57@gmail.com>
This commit is contained in:
parent
2680739153
commit
b9d0864957
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/5198-proxmox.yml
Normal file
2
changelogs/fragments/5198-proxmox.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "proxmox_kvm - fix ``agent`` parameter when boolean value is specified (https://github.com/ansible-collections/community.general/pull/5198)."
|
|
@ -963,7 +963,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
||||||
if 'agent' in kwargs:
|
if 'agent' in kwargs:
|
||||||
try:
|
try:
|
||||||
# The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility.
|
# The API also allows booleans instead of e.g. `enabled=1` for backward-compatibility.
|
||||||
kwargs['agent'] = boolean(kwargs['agent'], strict=True)
|
kwargs['agent'] = int(boolean(kwargs['agent'], strict=True))
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Not something that Ansible would parse as a boolean.
|
# Not something that Ansible would parse as a boolean.
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue