From 2241db8a74f5846686849bde35d24552c05cca26 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 31 Oct 2021 20:35:34 +0100 Subject: [PATCH] Fixed - TypeError: unexpected keyword argument (#3649) (#3653) * Fixed - TypeError: unexpected keyword argument - File proxmox_group_info.py creates the error "TypeError: get_group() got an unexpected keyword argument \'group\'\r\n'" if a group parameter is used. Issue is an argument naming conflict. After changing the argument name to 'groupid', as used in method ProxmoxGroupInfoAnsible::get_group, testing a Proxmox group name is working now. * Changelog fragment added for #3649 changelog fragment for TypeError: unexpected keyword argument #3649 * Update changelogs/fragments/3649-proxmox_group_info_TypeError.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit 0df41241dd8741cb5978437ef42478172811b48e) Co-authored-by: hklausing --- changelogs/fragments/3649-proxmox_group_info_TypeError.yml | 3 +++ plugins/modules/cloud/misc/proxmox_group_info.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/3649-proxmox_group_info_TypeError.yml diff --git a/changelogs/fragments/3649-proxmox_group_info_TypeError.yml b/changelogs/fragments/3649-proxmox_group_info_TypeError.yml new file mode 100644 index 0000000000..9620ea7203 --- /dev/null +++ b/changelogs/fragments/3649-proxmox_group_info_TypeError.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - proxmox_group_info - fix module crash if a ``group`` parameter is used (https://github.com/ansible-collections/community.general/pull/3649). diff --git a/plugins/modules/cloud/misc/proxmox_group_info.py b/plugins/modules/cloud/misc/proxmox_group_info.py index bf88659656..1443de0b1c 100644 --- a/plugins/modules/cloud/misc/proxmox_group_info.py +++ b/plugins/modules/cloud/misc/proxmox_group_info.py @@ -131,7 +131,7 @@ def main(): group = module.params['group'] if group: - groups = [proxmox.get_group(group=group)] + groups = [proxmox.get_group(groupid=group)] else: groups = proxmox.get_groups() result['proxmox_groups'] = [group.group for group in groups]