hello all,
I am not good in english so I hope you will understand me.
I am using ansible to interact with netbox and am having some issue :
when i try to create an ip address in netbox from ansible I get message that the ip address has been created but when I go back to netbox the ip address is not there.
task ansible:
- name: Getting prefix
delegate_to: localhost
netbox.netbox.netbox_ip_address:
netbox_url: URL
netbox_token: TOKEN
validate_certs: no
data:
address: 10.10.10.254
state: present
here is the fedback from ansible :
"changed": true,
"diff": {
"after": {
"state": "present"
},
"before": {
"state": "absent"
}
},
"invocation": {
"module_args": {
"data": {
"address": "10.10.10.254",
"assigned_object": null,
"custom_fields": null,
"description": null,
"dns_name": null,
"family": null,
"interface": null,
"nat_inside": null,
"prefix": null,
"role": null,
"status": null,
"tags": null,
"tenant": null,
"vrf": null
},
"netbox_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"netbox_url": "url",
"query_params": null,
"state": "present",
"validate_certs": false
}
},
"ip_address": {
"count": 1,
"next": null,
"previous": null,
"results": [
2
]
},
"msg": "ip_address
10.10.10.254/32 created"
}
Also when i try to creat the ip address using CURL it doesn't work :
output : {"non_field_errors":["Expected a list of items but got type \"dict\"."]}
can anyone help me out ?