Skip to content

How to link/map Devices and virtual machines from other sources #18735

Closed Answered by chris240189
Kloppi313 asked this question in Q&A
Discussion options

You must be logged in to vote

You can add a custom field to any netbox object if you need to store external identifiers.
Renaming things though ansible netbox modules is not straight forward, as it expects the names to be a unique identifer, so renaming doesn't work or at least I haven't understand how to do it.

I have a similar problem with VLANs that I import from another system where VLANs might get renamed but keep their number.

To do a "sync" I query all my objects from the external source and from netbox and match them on the identifier and do a

  ansible.builtin.uri:
...
    method: PATCH
...

on them.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kloppi313
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants