From c26f63fa534b4282a303ec3c27c45d50fb58b59a Mon Sep 17 00:00:00 2001 From: Johanna Dorothea Reichmann Date: Wed, 24 Aug 2022 13:08:38 +0200 Subject: [PATCH] fix(realm): when updating realms, don't send the type --- plugins/module_utils/proxmox_datacenter_realm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/module_utils/proxmox_datacenter_realm.py b/plugins/module_utils/proxmox_datacenter_realm.py index 2cad127..be06ce9 100644 --- a/plugins/module_utils/proxmox_datacenter_realm.py +++ b/plugins/module_utils/proxmox_datacenter_realm.py @@ -28,7 +28,9 @@ def set_realm_data(auth_info: ProxmoxAuthInfo, realm: str, config: dict[str, str if existing_realm.ok: existing_realm_data = existing_realm.json()['data'] if not dry_run: - realm_res = _proxmox_request('put', f"/access/domains/{realm}", auth_info, data=config) + put_args_denylist = ['type'] + put_config = {k: v for k, v in config.items() if k not in put_args_denylist} + realm_res = _proxmox_request('put', f"/access/domains/{realm}", auth_info, data=put_config) realm_res.raise_for_status() else: if not dry_run: