Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124215
Readme.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
847 B
Subscribers
None
Readme.md
View Options
#
Fact
importer
into
netbox
Samall
utility
to
import
the
puppet
facts
content
into
netbox
##
usage
###
first
time
```
bash
python3
-
m
venv
.
venv
.
.
venv
/
bin
/
activate
pip
install
-
r
requirements
.
txt
```
###
Initialize
netbox
the
``
init
.
py
``
script
initialize
the
following
netbox
properties
in
order
to
import
the
puppet
facts
:
-
device
providers
-
device
types
-
vlan
-
ip
prefixes
-
tags
-
platforms
-
device
roles
To
run
it
:
```
bash
.
.
venv
/
bin
/
activate
export
NETBOX_URL
=
http
:
//localhost:8080
export
NETBOX_TOKEN
=<
api
token
>
export
FACTS_DIRECTORY
=/
path
/
to
/
puppet
-
environment
/
octocatalog
-
diff
/
facts
">
python run.py
```
### Import facts
```bash
. .venv/bin/activate
export NETBOX_URL=http://localhost:8080
export NETBOX_TOKEN=<api token>
export FACTS_DIRECTORY=/path/to/puppet-environment/octocatalog-diff/facts"
>
python
run
.
py
```
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 6:50 PM (2 w, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3240310
Attached To
rDSNIP Code snippets
Event Timeline
Log In to Comment