Module to query NetBox
codeauthor: | Zach Moody <zmoody@do.co> |
---|---|
maturity: | new |
depends: | pynetbox |
The following config should be in the minion config file. In order to
work with secrets
you should provide a token and path to your
private key file:
netbox:
url: <NETBOX_URL>
token: <NETBOX_USERNAME_API_TOKEN (OPTIONAL)>
keyfile: </PATH/TO/NETBOX/KEY (OPTIONAL)>
New in version 2018.3.0.
salt.modules.netbox.
filter
(app, endpoint, **kwargs)¶Get a list of items from NetBox.
salt myminion netbox.filter dcim devices status=1 role=router
salt.modules.netbox.
get
(app, endpoint, id=None, **kwargs)¶Get a single item from NetBox.
To get an item based on ID.
salt myminion netbox.get dcim devices id=123
Or using named arguments that correspond with accepted filters on the NetBox endpoint.
salt myminion netbox.get dcim devices name=my-router
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2018.3.2