From bc5ad0f798fd6cc7eb31eda9e777f108b941163a Mon Sep 17 00:00:00 2001 From: Johanna Dorothea Reichmann Date: Wed, 24 Aug 2022 12:00:31 +0200 Subject: [PATCH] fix(acl): send propagation boolean as string-encoded integer to proxmox api --- plugins/module_utils/proxmox_datacenter_acl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/proxmox_datacenter_acl.py b/plugins/module_utils/proxmox_datacenter_acl.py index 5e5ae31..4e293be 100644 --- a/plugins/module_utils/proxmox_datacenter_acl.py +++ b/plugins/module_utils/proxmox_datacenter_acl.py @@ -36,12 +36,12 @@ def set_acl(auth_info: ProxmoxAuthInfo, acl: ProxmoxACL, dry_run: bool, state: s if state == 'present': acl_spec = _acl_to_dict(acl) | { - 'propagate': acl.propagate + 'propagate': "1" if acl.propagate else "0" } if not dry_run: - acl_res = _proxmox_request('put', f"/access/acl", auth_info, data=acl_spec) + acl_res = _proxmox_request('put', '/access/acl', auth_info, data=acl_spec) acl_res.raise_for_status() - if acl_res.ok and acl_res.json()['success'] == 1: + if acl_res.ok: new_acl = acl else: new_acl = acl