|
374 | 374 | from ansible.module_utils.basic import AnsibleModule, env_fallback |
375 | 375 | from ansible.module_utils.common.text.converters import to_native |
376 | 376 |
|
| 377 | +from ansible_collections.community.general.plugins.module_utils.proxmox import ( |
| 378 | + ansible_to_proxmox_bool |
| 379 | +) |
| 380 | + |
377 | 381 |
|
378 | 382 | VZ_TYPE = None |
379 | 383 |
|
@@ -627,14 +631,14 @@ def main(): |
627 | 631 | netif=module.params['netif'], |
628 | 632 | mounts=module.params['mounts'], |
629 | 633 | ip_address=module.params['ip_address'], |
630 | | - onboot=int(module.params['onboot']), |
| 634 | + onboot=ansible_to_proxmox_bool(module.params['onboot']), |
631 | 635 | cpuunits=module.params['cpuunits'], |
632 | 636 | nameserver=module.params['nameserver'], |
633 | 637 | searchdomain=module.params['searchdomain'], |
634 | | - force=int(module.params['force']), |
| 638 | + force=ansible_to_proxmox_bool(module.params['force']), |
635 | 639 | pubkey=module.params['pubkey'], |
636 | 640 | features=",".join(module.params['features']) if module.params['features'] is not None else None, |
637 | | - unprivileged=int(module.params['unprivileged']), |
| 641 | + unprivileged=ansible_to_proxmox_bool(module.params['unprivileged']), |
638 | 642 | description=module.params['description'], |
639 | 643 | hookscript=module.params['hookscript']) |
640 | 644 |
|
|
0 commit comments