-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Ansible NetBox Collection version
v3.21.0
Ansible version
using this task:
- name: Create service
netbox.netbox.netbox_service:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
data:
device: mydevice
name: ServiceX
ports: 9100
protocol: TCP
ipaddresses:
- address: 10.1.0.1
state: present
Produces this output:
TASK [Create service] ***********************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "{\"parent_object_type\":[\"This field is required.\"],\"parent_object_id\":[\"This field is required.\"]}"}
Another error appears when setting a virtual_machine instead of a device:
TASK [Create service] ***********************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "virtual_machine does not exist on existing object. Check to make sure valid field."}
NetBox version
NetBox Community v4.3.1-Docker-3.3.0 (2025-05-13)
Python version
3.11
Steps to Reproduce
See description
Expected Behavior
Proper parameters mapping between Ansible module & the API.
Observed Behavior
missing required API parameters or parameters mapping.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working