NetBox Roster¶
Load devices from NetBox, and make them available for salt-ssh or salt-sproxy (or any other program that doesn’t require (Proxy) Minions running).
Make sure that the following options are configured on the Master:
netbox:
url: <NETBOX_URL>
token: <NETBOX_USERNAME_API_TOKEN (OPTIONAL)>
keyfile: </PATH/TO/NETBOX/KEY (OPTIONAL)>
If you want to pre-filter the devices, so it won’t try to pull the whole
database available in NetBox, you can configure another key, filters
, under
netbox
, e.g.,
netbox:
url: <NETBOX_URL>
filters:
site: <SITE>
status: <STATUS>
Hint
You can use any NetBox field as a filter.
Important
In NetBox v2.6 the default view permissions changed, so salt-sproxy
may
not able to get the device list from NetBox by default.
Add EXEMPT_VIEW_PERMISSIONS = ['*']
to the configuration.py
NetBox
file to change this behavior.
See https://github.com/netbox-community/netbox/releases/tag/v2.6.0 for more
information