Skip to content

cbabs/solarwinds-ansible-inv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

swinds-ansible-inv

Dynamic Inventory for Solar Winds hosts in Ansible

This python script connects to Solar Winds via rest API to create a dynamic inventory in Ansible. JSON data is pulled into the python script via rest https API call to Orion. Groups are based on 'Vendor'. It pulls the 'IPAddress' for hosts field. The impetus for this script was for network devices. As such, the 'IPAddress' was chosen over say hostname. If one wanted to use anisble for servers with DNS using hostnames, replacing the 'IPAdrress' string to 'SysName' should produce that result. One could also change the 'Vendor' to somethign else like the OS version. I would recommend downloading the SWQL Studio and look under Orion.Nodes table for more options.

Any suggestions/code to improve would be awesome.

About

Dynamic Inventory for Solar Winds hosts in Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages