bundlewrap/bundles/netbox/files/configuration.py

121 lines
2.3 KiB
Python
Raw Normal View History

2021-08-17 16:02:15 +00:00
ALLOWED_HOSTS = [
'${node.metadata.get('netbox/domain')}'
]
DATABASE = {
'NAME': 'netbox',
'USER': 'netbox',
'PASSWORD': '${repo.vault.password_for("netbox postgresql " + node.name)}',
'HOST': 'localhost',
'PORT': '',
}
REDIS = {
'tasks': {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 0,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
},
'caching': {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
}
}
SECRET_KEY = '${repo.vault.password_for('django secret netbox ' + node.name, length=50)}'
ADMINS = [
2021-08-21 10:46:55 +00:00
% for name, email in sorted(node.metadata.get('netbox/admins', {}).items()):
2021-12-12 07:36:18 +00:00
('${name}', '${email}'),
2021-08-17 16:02:15 +00:00
% endfor
]
BASE_PATH = ''
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = [
% for hostname in sorted(node.metadata.get('netbox/cors_allowlist', set())):
'${hostname}',
% endfor
]
CORS_ORIGIN_REGEX_WHITELIST = []
DEBUG = False
EMAIL = {
'SERVER': 'localhost',
'PORT': 25,
'USERNAME': '',
'PASSWORD': '',
'TIMEOUT': 10, # seconds
'FROM_EMAIL': '',
}
ENFORCE_GLOBAL_UNIQUE = True
2021-09-02 05:52:11 +00:00
EXEMPT_VIEW_PERMISSIONS = []
2021-12-12 07:36:18 +00:00
INTERNAL_IPS = ('127.0.0.1', '::1')
2021-09-02 05:52:11 +00:00
2021-08-17 16:02:15 +00:00
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
}
2021-09-02 05:52:11 +00:00
LOGIN_PERSISTENCE = True
2021-08-17 16:02:15 +00:00
LOGIN_REQUIRED = False
2021-09-02 05:52:11 +00:00
LOGIN_TIMEOUT = 14 * 24*60*60
2021-08-17 16:02:15 +00:00
MEDIA_ROOT = '/opt/netbox/media'
2021-12-12 07:36:18 +00:00
METRICS_ENABLED = False
2021-08-17 16:02:15 +00:00
NAPALM_USERNAME = ''
NAPALM_PASSWORD = ''
NAPALM_TIMEOUT = 30
NAPALM_ARGS = {}
2021-09-02 05:52:11 +00:00
PLUGINS = []
2021-08-17 16:02:15 +00:00
PREFER_IPV4 = False
2021-09-02 05:52:11 +00:00
RACK_ELEVATION_DEFAULT_UNIT_HEIGHT = 22
RACK_ELEVATION_DEFAULT_UNIT_WIDTH = 220
2021-08-17 16:02:15 +00:00
# We use icinga for that.
RELEASE_CHECK_URL = None
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
2021-09-02 05:52:11 +00:00
RQ_DEFAULT_TIMEOUT = 300
2021-08-17 16:02:15 +00:00
SCRIPTS_ROOT = '/opt/netbox/scripts'
2021-09-02 05:52:11 +00:00
SESSION_COOKIE_NAME = 'sessionid'
SESSION_FILE_PATH = None
2021-08-17 16:02:15 +00:00
TIME_ZONE = 'UTC'
DATE_FORMAT = 'N j, Y'
SHORT_DATE_FORMAT = 'Y-m-d'
TIME_FORMAT = 'g:i a'
SHORT_TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'N j, Y g:i a'
SHORT_DATETIME_FORMAT = 'Y-m-d H:i'