You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the same requirement: get an inventory of all devices with all their interfaces.
You can run the script
python netbox.py -c netbox.interfaces.yml --list
and in the netbox.interfaces.yml you set
api_url: 'http://netbox/api/dcim/interfaces/?device_id=1'
But then you have only the interfaces of one device.
When trying to get all devices with all its interfaces I would get a naming conflict in the host_vars, because interfaces on different devices have the same name.
I could then call the script one time for all the devices and then again for per device for its interfaces.
But this logic is a few lines of python code. I don't know how to do this purely in ansible.
Or is there a way to use this script in one shot( get an inventory of all devices with all their interfaces)?
Can you add the device interfaces as host_vars?
The text was updated successfully, but these errors were encountered: