File tree Expand file tree Collapse file tree 5 files changed +11
-19
lines changed
Expand file tree Collapse file tree 5 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,7 @@ netbox_metrics_enabled: false
5050netbox_metrics_dir : netbox_metrics
5151netbox_metrics_path : " /run/{{ netbox_metrics_dir }}"
5252
53- netbox_config :
54- # SECRET_KEY:
55- ALLOWED_HOSTS :
56- - localhost
57- - 127.0.0.1
58- # NAPALM_USERNAME:
59- # NAPALM_PASSWORD:
60- MEDIA_ROOT : " {{ netbox_shared_path }}/media"
61- REPORTS_ROOT : " {{ netbox_shared_path }}/reports"
62- SCRIPTS_ROOT : " {{ netbox_shared_path }}/scripts"
53+ netbox_config : {}
6354
6455netbox_scripts : []
6556netbox_reports : []
Original file line number Diff line number Diff line change 2929
3030- name : Define _netbox_config
3131 set_fact :
32- _netbox_config : " {{ netbox_config }}"
32+ _netbox_config : " {{ _netbox_default_config | combine( netbox_config, recursive=True) }}"
3333
3434- name : Generate list of optional Python dependencies
3535 set_fact :
Original file line number Diff line number Diff line change 116116 name : " {{ item }}"
117117 state : started
118118 enabled : true
119+ daemon_reload : true
119120 loop :
120121 - netbox.socket
121122 - netbox.service
Original file line number Diff line number Diff line change 4242 msg : " Please define NAPALM_USERNAME and NAPALM_PASSWORD in netbox_config to use NAPALM."
4343 when : " netbox_napalm_enabled | bool"
4444
45- - name : NetBox user content directories must be specified
46- assert :
47- that :
48- - " 'MEDIA_ROOT' in netbox_config"
49- - " 'REPORTS_ROOT' in netbox_config"
50- - " 'SCRIPTS_ROOT' in netbox_config"
51- msg : " Please ensure MEDIA_ROOT/REPORTS_ROOT/SCRIPTS_ROOT are defined in netbox_config."
52-
5345- name : Script/Report module names should follow PEP8
5446 assert :
5547 that :
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ netbox_config_path: "{{ netbox_current_path }}/netbox/netbox"
44netbox_virtualenv_path : " {{ netbox_current_path }}/venv-py3"
55netbox_uwsgi_cmd : " {{ netbox_virtualenv_path }}/bin/uwsgi"
66
7+ _netbox_default_config :
8+ ALLOWED_HOSTS :
9+ - localhost
10+ - 127.0.0.1
11+ MEDIA_ROOT : " {{ netbox_shared_path }}/media"
12+ REPORTS_ROOT : " {{ netbox_shared_path }}/reports"
13+ SCRIPTS_ROOT : " {{ netbox_shared_path }}/scripts"
14+
715_netbox_storages_map :
816 s3boto3 : boto3
917 apache_libcloud : " apache-libcloud"
You can’t perform that action at this time.
0 commit comments