talas-group/04_INFRA_DEPLOIEMENT/Ansible/roles/netbox/templates/configuration.py.j2
senke 66471934af Initial commit: Talas Group project management & documentation
Knowledge base of ~80+ markdown files across 14 domains (00-13),
Logseq graph, hardware design files (KiCAD), infrastructure configs,
and talas-wiki static site.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 20:10:41 +02:00

51 lines
1.2 KiB
Django/Jinja

# {{ ansible_managed }}
DATABASE = {
"NAME": "netbox",
"USER": "netbox",
"PASSWORD": "{{ lookup('hashi_vault', 'secret=cosium-kv/data/' + host_vars_location + '/' + ansible_hostname)['postgres_user_netbox_password'] }}",
"HOST": "",
"PORT": "",
}
REDIS = {
'tasks': {
'URL': 'unix:///var/run/redis/redis-server.sock?db=0'
},
'caching': {
'URL': 'unix:///var/run/redis/redis-server.sock?db=1'
},
}
RQ_DEFAULT_TIMEOUT = 300
{% for setting, value in netbox_config.items() %}
{% if value in [True, False] %}
{{ setting }} = {{ "True" if value else "False" }}
{% else %}
{{ setting }} = {{ value | to_nice_json }}
{% endif %}
{% endfor %}
LOGIN_REQUIRED = True
CHANGELOG_RETENTION = {{ netbox_changelog_days_retention }}
{% if netbox_plugins is defined %}
PLUGINS = [
{% for plugin in netbox_plugins %}
'{{ plugin }}',
{% endfor %}
]
{% endif %}
{% if "netbox_napalm_plugin" in netbox_plugins %}
PLUGINS_CONFIG = {
'netbox_napalm_plugin': {
'NAPALM_USERNAME': '{{ netbox_napalm_username }}',
'NAPALM_PASSWORD': '{{ netbox_napalm_password }}',
},
}
{% endif %}
RELEASE_CHECK_URL = "https://api.github.com/repos/netbox-community/netbox/releases"