bundlewrap/bundles/netbox/files/configuration.py

118 lines
2.2 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-08-17 16:02:15 +00:00
['${name}', '${email}'],
% endfor
]
BANNER_TOP = ''
BANNER_BOTTOM = ''
BASE_PATH = ''
CACHE_TIMEOUT = 0
CHANGELOG_RETENTION = ${node.metadata.get('netbox/changelog_retention_days', 90)}
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
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
}
LOGIN_REQUIRED = False
MAINTENANCE_MODE = False
MAX_PAGE_SIZE = 1000
MEDIA_ROOT = '/opt/netbox/media'
NAPALM_USERNAME = ''
NAPALM_PASSWORD = ''
NAPALM_TIMEOUT = 30
NAPALM_ARGS = {}
PAGINATE_COUNT = 100
PLUGINS = {}
PREFER_IPV4 = False
# We use icinga for that.
RELEASE_CHECK_URL = None
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
SCRIPTS_ROOT = '/opt/netbox/scripts'
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'