Skip to content

Commit 465377c

Browse files
committed
Update documentation [ci skip]
1 parent f567c53 commit 465377c

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This role will deploy NetBox within its own virtualenv either by release tarball
1010
or via git using Python 3 (or 2 if you're so inclined) and uWSGI as the
1111
application server.
1212

13-
Tested and supported against CentOS 7/Debian 8/Ubuntu 16.
13+
Tested and supported against CentOS 7/Debian 8 and 9/Ubuntu 16.
1414

1515
Note that this role is slightly opinionated and differs from installation
1616
instructions from the NetBox documentation. The main differences are:
@@ -55,7 +55,7 @@ tells the role to deploy by extracting tarball releases from GitHub, while
5555
`netbox_git` tells the role to clone a NetBox git repository - they're mutually
5656
exclusive.
5757

58-
netbox_stable_version: 2.1.3
58+
netbox_stable_version: 2.1.4
5959
netbox_stable_uri: "https://github.com/digitalocean/netbox/archive/v{{ netbox_stable_version }}.tar.gz"
6060

6161
These can be configured to pin a version (e.g. increment to trigger an upgrade)
@@ -95,6 +95,7 @@ Note that these are used to configure `DATABASE` in `configuration.py`.
9595
ALLOWED_HOSTS:
9696
- localhost
9797
- 127.0.0.1
98+
MEDIA_ROOT: "{{ netbox_shared_path }}/media"
9899

99100
This is a dictionary of settings used to template NetBox's `configuration.py`.
100101
See [Mandatory Settings] and [Optional Settings] from the NetBox documentation
@@ -106,6 +107,10 @@ The `SECRET_KEY` will then be read from this file on subsequent runs, unless you
106107
later do set this in your playbook. Note that you should define the `SECRET_KEY`
107108
if you are deploying multiple NetBox instances behind one load balancer.
108109

110+
`MEDIA_ROOT`, while not mandatory in the NetBox documentation, is mandatory in
111+
this role. It should be set to a directory that is permanent and not lost on
112+
upgrade (the default, listed above, can be used without issue).
113+
109114
netbox_user: netbox
110115
netbox_group: netbox
111116
netbox_home: /srv/netbox
@@ -160,6 +165,12 @@ NetBox. `netbox_ldap_config_template` should be the path to your template - by
160165
default, Ansible will search your playbook's `templates/` directory for this.
161166
You can find an example in `examples/`.
162167

168+
netbox_napalm_enabled: false
169+
170+
Toggle this to enable NAPALM integration in NetBox. You must define
171+
`NAPALM_USERNAME` and `NAPALM_PASSWORD` in the `netbox_config` variable to be
172+
able to use NAPALM.
173+
163174
Example Playbook
164175
----------------
165176

@@ -180,6 +191,7 @@ socket to talk to the Postgres server with the default netbox database user.
180191
netbox_config:
181192
ALLOWED_HOSTS:
182193
- netbox.idolactiviti.es
194+
MEDIA_ROOT: "{{ netbox_shared_path }}/media"
183195
postgresql_users:
184196
- name: "{{ netbox_database_user }}"
185197
role_attr_flags: CREATEDB,NOSUPERUSER
@@ -201,6 +213,7 @@ installing NetBox on to authenticate with it over TCP:
201213
netbox_config:
202214
ALLOWED_HOSTS:
203215
- "{{ inventory_hostname }}"
216+
MEDIA_ROOT: "{{ netbox_shared_path }}/media"
204217
netbox_database_host: pg-netbox.idolactiviti.es
205218
netbox_database_port: 15432
206219
netbox_database: netbox_prod

examples/netbox_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ netbox_config:
4141
SHORT_TIME_FORMAT: 'H:i:s'
4242
DATETIME_FORMAT: 'N j, Y g:i a'
4343
SHORT_DATETIME_FORMAT: 'Y-m-d H:i'
44+
MEDIA_ROOT: /srv/netbox_media

examples/playbook_single_host_deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
netbox_config:
1212
ALLOWED_HOSTS:
1313
- "{{ inventory_hostname }}"
14+
MEDIA_ROOT: "{{ netbox_shared_path }}/media"
1415
netbox_database_socket: "{{ postgresql_unix_socket_directories[0] }}"
1516
postgresql_users:
1617
- name: "{{ netbox_database_user }}"

0 commit comments

Comments
 (0)