Closed shakin89 closed 6 months ago
I'm afraid that's a limitation of custom fields in NetBox.
A NetBox custom field referencing an object expects that object's id
as its value. There does not seem a mechanism to refer to a different attribute instead.
So you would need to pull a list of NetBox DNS zones in Ansible at the beginning of the code section and store that list (or dictionary, keyed by name
) in a variable. Then you could use indirect addressing to refer to the id
.
Didn't want to open a new issue because this is help wanted question. I would like to import netbox-dns custom fields from ansible. This is my variable dict
but when i use netbox ip_address module i always get an error. This is my task
But i get always this error:
I do not understand how i should express the dns_zone_id field. If i write it in this way
i get
Is it only allowed to have numerical id? Thanks in advance for any help. I appreciate your great work.