Open renekrieg opened 9 months ago
I am getting the same when I try to do parent and sub groups.
Ran into the same problem and did some digging.
When the contact module is executed, the constructor of NetboxModule
is called (through NetboxTenancyModule
) and in turn calls NetboxModule._convert_identical_keys
(see plugins/module_utils/netbox_utils.py#L739). That one essentially uses CONVERT_KEYS
to map the contact_group
to group
.
Later on in the module execution, NetboxModule._build_query_params
is started, and in plugins/module_utils/netbox_utils.py#L956 this key that was converted to group
is found in QUERY_PARAM_IDS
, which in turn provokes NetboxModule._get_query_param_id
to map the group
key in CONVERT_TO_ID
to tenant_groups
, which is clearly not desired.
Still looking further, but I am a bit uncertain on how to resolve that.
Ansible NetBox Collection version
v3.16.0
Ansible version
NetBox version
v3.7.2
Python version
3.11
Steps to Reproduce
The following playbook is expected to create a new contact "test" and assign the contact to the contact_group "Administrator".
Expected Behavior
Contact "test" should be assigned to Group "Administrator".
Observed Behavior
Netbox API throws this error: