Hello
I am using Netbox 2.6.1 an duse ansible to create devices and IP addresses .
I am trying to create a Ip address for a device and make it as primary_ip4 and was able to get it working before and now I am not able to get it as a primary_ip4 (This might be specific to Ansible modules but not an issue with Netbox FYI)
ERROR:
"msg": {"primary_ip4": ["Related objects must be referenced by numeric ID or by dictionary of attributes. Received an unrecognized value:192.X.X.X
Code:
name: Create IP address within Netbox with Primary IP
netbox_ip_address:
netbox_url:
netbox_token:
data:
family: 4
address: "{{ hostvars[item]['facter_ipaddress'] }}"
interface:
name: NIC1
device: "{{item}}"
state: present
with_items: "{{groups.machines}}"
netbox_device:
netbox_url:
netbox_token:
data:
name: "{{item}}"
serial: "{{ hostvars[item]['SERIAL'] }}"
primary_ip4: "{{ hostvars[item]['facter_ipaddress'] }}"
But now I am not even able to assign an IP address to a device using the playbook.Checking if someone has encountered the same issue ?
Thanks