-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Ansible NetBox Collection version
3.21.0
Ansible version
ansible [core 2.18.3]
config file = /home/user/work/sources/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/user/work/sources/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = TrueNetBox version
NetBox Community v4.4.1-Docker-3.4.0
Python version
3.11
Steps to Reproduce
Use a task with the mac address module:
- name: Create MAC address with assignation to the host and interface
netbox.netbox.netbox_mac_address:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
data:
mac_address: "00:11:22:33:44:55"
assigned_object:
device: "host01"
name: "eth0"
query_params:
- assigned_object_type
Expected Behavior
Netbox would set or return the mac address
Observed Behavior
An error message is returned: "{\"assigned_object_type\":[\"Select a valid choice. That choice is not one of the available choices.\"
This choice seems to be valid.
When setting a wrong choice in the query_params (test_choice in this exemple) the module returns a list of valid choices:
One or more of the kwargs provided are invalid for mac_address, provided kwargs: assigned_object, assigned_object_id, assigned_object_type, mac_address. Acceptable kwargs: test_choice.
Note that acceptable kwargs and provided kwargs are inverted.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working