Hi folks,
I've been tasked with adding a couple thousand network devices to SW. Is there an ansible playbook / module that does that? I didn't find any in the Orion github space. Any help would be greatly appreciated.
-JC
If you look at Ansible really as just being an automation engine, the question is more about which language you're comfortable with, right? Using the SWIS API, you could automate this task using PowerShell, Python, etc and then drop that script into Ansible.
Is there a code example using python or an ansible module to do bulk additions to SW? I haven't seen an example of this in the SDK git repo. It seems like a common use case, in that I've see it asked many times in this forum but I haven't been able to locate the actual answer.
You're right ansible was simply a means to an end. Ansible is preferable as it would afford network engineers who aren't typically developers the ability to add newly deployed devices into SW (in addition to 1000's of existing network devices). A SW ansible module would also allow network engineers to integrate a "downtime" playbooks as a pre-change step into automated network changes.
I've not yet dug into Ansible, but others on my team have just got it up and running. I'll have them let me know if/when they find or make something that fits your description.
Module Index — Ansible Documentation
Monitoring modules — Ansible Documentation
We use IPAM. Unfortunately there is only PowerShell API to make changes, not REST. You can start reading from this links:
- PowerShell · solarwinds/OrionSDK Wiki · GitHub
- IPAM 4.7 API · solarwinds/OrionSDK Wiki · GitHub
So you need to first connect to windows host with WinRM. But that is different story. I've used both transports: Certificate over HTTPS for passwordless and CredSSP.
If you ever want to use IPAM as source of trust for you Infrastructure as Code, please look at my GitHub - alexkross/swipam-script: Ansible dynamic inventory script for SolarWinds IPAM product .
I took a stab at writing an ansible module to work with solarwinds nodes. Its not fully tested, but it does work for some test cases. I am neither an expert on ansible, nor python, so any help/advice/comments are welcome.
GitHub - jdchaiken/solarwinds-Node_Module
jdchaiken Thanks for sharing your work. I am going to add on some functions.
I was wondering if you have continued to use it and how is it working for you?
Thanks,
Romeo
I actually did something similar for my inventory. I am not using the IPAM API, but I am using the SWIS API to pull from NPM so I can leverage my custom attributes, groups, and other attributes. I think I actually got inspiration from your repo when I wrote it.
I did start writing a custom module to add/remove/edit Nodes at (GitHub - jdchaiken/solarwinds-Node_Module ). Its at least partially working, but still need a lot of love.