Comments (9)
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.
from ansible_modules.
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.
from ansible_modules.
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!
from ansible_modules.
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.
I'm looking into this from the point of view of servers, but I see networking devices would benefit from it too.
In most cases the facts from ansible should be able to provide details about the name of the device, the operating system, cpu, ram, disk usage, network interfaces and ips, etc.
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 )
Another project to take a look at would be the netbox_agent ( https://github.com/Solvik/netbox_agent ) which does provide the data into netbox, but does require the agent set up on the servers, and as such won't be useful for networking devices.
from ansible_modules.
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.
from ansible_modules.
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.
from ansible_modules.
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 ?
from ansible_modules.
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).
While the idea for the role sounds simple it turned out to be quite involved and I've still got a few things to iron out until I feel comfortable publishing it.
from ansible_modules.
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...
from ansible_modules.
Related Issues (20)
- [Housekeeping]: Bump Version
- [Feature]: Event rules management
- [Bug]: netbox_device "More than one result returned for location" HOT 1
- [Bug]: Ansible Netbox integration doesn't work anymore after upgrading to NetBox 4.0.3 from NetBox 3.6.7 HOT 7
- [Bug]: netbox.netbox.nb_inventory fails to sync HOT 1
- [Bug]: netbox_module returns error "More than one result returned for module_bay" HOT 3
- [Feature]: support related_object_type on custom field
- [Bug]: Netbox inventory services data variable name interfere with ansible builtin service_facts
- [Bug]: Cable Module is not idempotent HOT 1
- [Feature]: netbox_cluster - Adds status field HOT 2
- [Feature]: netbox_cluster_group - Adds description field HOT 3
- [Feature]: Script module
- [Feature]: Use last_updated field when using cache
- [Feature]: netbox_location - Add status field HOT 2
- [Feature]: netbox_location - Add facility field HOT 3
- [Feature]: Tunnel Groups module
- [Feature]: Tunnel Terminations module
- [Bug]: API calls don't follow HTTP redirects. HOT 1
- [Feature]: Netbox Location Module missing Status parameter HOT 1
- [Bug]: netbox_virtual_chassis fails to query by master
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible_modules.