-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ansible facts to populate data? #25
Comments
This should already be possible as you would just pass the necessary data into the Netbox modules that are obtained from whatever fact gathering is done. There might have to be some data normalization that needs to happen to work with the modules, though. |
Yes I understand that I can technically put what ever data I need into the netbox modules and use that, I was more curious if there would be an "official" way so to speak on the roadmap. |
Not at the moment. One of my colleagues is working on using Batfish to import data into Netbox using these modules, but nothing on the roadmap to be included within this repo. Not sure when that project will be open sourced as it's still be developed, but you can watch the demonstration from NFD. NFD21 - Look at the Network to Code Network Automation Journey – Part 1. If i'm off base on what you're asking, please provide an example! |
Well not sure if you are off base but I'll explain what I'm asking a little better anyways. What I'm trying to achieve is to use ansible to provide details about devices in netbox automatically, the way I see it is that at first ansible would connect to the device I want to add to netbox and gather facts about the device, then it would use those facts to create or update the device and the inventory items of the device. This would basically be the same thing ansible-cmdb does but it would populate the information in netbox rather than ansible-cmdb ( https://github.com/fboender/ansible-cmdb ) |
Thanks for the explanation and examples. That is definitely not something this collection is looking to accomplish. It's just a way to use Ansible to populate Netbox via Ansible. It can definitely be used as an interface for such projects. The furthest this collection will go away from that is inventory/lookup plugins. |
Reading through the blog article on the new network features coming in Ansible 2.9, it might be worth looking in to whether these modules could take the, now standard, data structures that the Ansible network modules will produce/consume and record the details against a named device in Netbox. |
This thread is a bit old, but I would need exactly the same kind of playbook using this module. It seems that there is no official way to do it even if it seems to be possible (I saw some stuff using this module with network device to gather device informations and import it using the netbox API). Any news about it ? |
I actually created my own Ansible role for this, but I have not made it public (yet). |
Ok. Please keep us inform about it. In the meantime, I created a basic python script to create a csv file for interfaces, but it is not really helpful... |
Are there any plans to have the option to gather data about a device with ansible facts and then use the facts to populate device/inventory data in netbox?
I'm sorry if this has already been discussed or if it's perhaps already possible, I only took a quick glance and it didn't seem like it's possible currently.
The text was updated successfully, but these errors were encountered: