cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

DYnamic inventory for ansible

I would like to create a dynamic inventory in ansible using solarwinds SWQL . I am having issues pulling the Orion.nodes and sorting for a Orion.nodesCustomProperties . 

SELECT N.DNS FROM Orion.Nodes as N
JOIN Orion.NodesCustomProperties as CP on N.NodeID = CP.NYT_PATCH_SCHEDULE
JOIN Orion.Nodes as C on CP.NYT_PATCH_SCHEDULE=C.DNS WHERE CP.NYT_PATCH_SCHEDULE = '9999NR'

my query any help will be great

0 Kudos
1 Reply

I'm not following what you are trying to do, use joins instead of where conditions?  I think what you are trying to do is probably best done this way:

 

select n.dns

from orion.nodes n

where n.customproperties.nyt_patch_schedule = '9999NR'

 

- Marc Netterfield, Github
0 Kudos