@@ -10,7 +10,7 @@ This role will deploy NetBox within its own virtualenv either by release tarball
10
10
or via git using Python 3 (or 2 if you're so inclined) and uWSGI as the
11
11
application server.
12
12
13
- Tested and supported against CentOS 7/Debian 8/Ubuntu 16.
13
+ Tested and supported against CentOS 7/Debian 8 and 9 /Ubuntu 16.
14
14
15
15
Note that this role is slightly opinionated and differs from installation
16
16
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
55
55
` netbox_git ` tells the role to clone a NetBox git repository - they're mutually
56
56
exclusive.
57
57
58
- netbox_stable_version: 2.1.3
58
+ netbox_stable_version: 2.1.4
59
59
netbox_stable_uri: "https://github.com/digitalocean/netbox/archive/v{{ netbox_stable_version }}.tar.gz"
60
60
61
61
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`.
95
95
ALLOWED_HOSTS:
96
96
- localhost
97
97
- 127.0.0.1
98
+ MEDIA_ROOT: "{{ netbox_shared_path }}/media"
98
99
99
100
This is a dictionary of settings used to template NetBox's ` configuration.py ` .
100
101
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
106
107
later do set this in your playbook. Note that you should define the ` SECRET_KEY `
107
108
if you are deploying multiple NetBox instances behind one load balancer.
108
109
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
+
109
114
netbox_user: netbox
110
115
netbox_group: netbox
111
116
netbox_home: /srv/netbox
@@ -160,6 +165,12 @@ NetBox. `netbox_ldap_config_template` should be the path to your template - by
160
165
default, Ansible will search your playbook's ` templates/ ` directory for this.
161
166
You can find an example in ` examples/ ` .
162
167
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
+
163
174
Example Playbook
164
175
----------------
165
176
@@ -180,6 +191,7 @@ socket to talk to the Postgres server with the default netbox database user.
180
191
netbox_config:
181
192
ALLOWED_HOSTS:
182
193
- netbox.idolactiviti.es
194
+ MEDIA_ROOT: "{{ netbox_shared_path }}/media"
183
195
postgresql_users:
184
196
- name: "{{ netbox_database_user }}"
185
197
role_attr_flags: CREATEDB,NOSUPERUSER
@@ -201,6 +213,7 @@ installing NetBox on to authenticate with it over TCP:
201
213
netbox_config:
202
214
ALLOWED_HOSTS:
203
215
- "{{ inventory_hostname }}"
216
+ MEDIA_ROOT: "{{ netbox_shared_path }}/media"
204
217
netbox_database_host: pg-netbox.idolactiviti.es
205
218
netbox_database_port: 15432
206
219
netbox_database: netbox_prod
0 commit comments