mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-12 19:21:23 +01:00
add a place to place files referenced in the config https://github.com/Security-Onion-Solutions/securityonion/issues/1175
This commit is contained in:
@@ -5,4 +5,22 @@ grafana:
|
||||
auth.anonymous:
|
||||
enabled: true
|
||||
org_name: Main Org.
|
||||
org_role: Viewer
|
||||
org_role: Viewer
|
||||
smtp:
|
||||
enabled: false
|
||||
host: localhost:25
|
||||
user: myuser
|
||||
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
|
||||
password: mypassword
|
||||
cert_file: /etc/grafana/config/files/smtp_cert_file.crt
|
||||
key_file: /etc/grafana/config/files/smtp_key_file.key
|
||||
skip_verify: false
|
||||
from_address: admin@grafana.localhost
|
||||
from_name: Grafana
|
||||
ehlo_identity: dashboard.example.com
|
||||
# auth.ldap:
|
||||
# enabled: false
|
||||
# config_file: /etc/grafana/config/files/ldap.toml
|
||||
# allow_sign_up: true
|
||||
# enterprise:
|
||||
# license_path: /opt/so/conf/grafana/etc/files/license.jwt
|
||||
@@ -10,7 +10,7 @@
|
||||
{% set ADMINPASS = salt['pillar.get']('secrets:grafana_admin') %}
|
||||
|
||||
{% import_yaml 'grafana/defaults.yaml' as default_settings %}
|
||||
{% set GRAFANA_SETTINGS = salt['pillar.get']('grafana', default=default_settings, merge=True) %}
|
||||
{% set GRAFANA_SETTINGS = salt['grains.filter_by'](default_settings, default='grafana', merge=salt['pillar.get']('grafana', {})) %}
|
||||
|
||||
|
||||
{% if grains['role'] in ['so-manager', 'so-managersearch', 'so-eval', 'so-standalone'] and GRAFANA == 1 %}
|
||||
@@ -104,6 +104,15 @@ grafana-config:
|
||||
- source: salt://grafana/etc/grafana.ini.jinja
|
||||
- context:
|
||||
config: {{ GRAFANA_SETTINGS.config|json }}
|
||||
|
||||
# these are the files that are referenced inside the config such as smtp:cert_file, smtp:cert_key, auth.ldap:config_file, enterprise:license_path
|
||||
grafana-config-files:
|
||||
file.recurse:
|
||||
- name: /opt/so/conf/grafana/etc/files
|
||||
- user: 939
|
||||
- group: 939
|
||||
- source: salt://grafana/etc/files
|
||||
- makedirs: True
|
||||
|
||||
|
||||
{% if salt['pillar.get']('managertab', False) %}
|
||||
@@ -252,6 +261,7 @@ so-grafana:
|
||||
- /opt/so/conf/grafana/etc/datasources:/etc/grafana/provisioning/datasources:rw
|
||||
- /opt/so/conf/grafana/etc/dashboards:/etc/grafana/provisioning/dashboards:rw
|
||||
- /opt/so/conf/grafana/grafana_dashboards:/etc/grafana/grafana_dashboards:rw
|
||||
- /opt/so/conf/grafana/etc/files:/etc/grafana/config/files:ro
|
||||
- environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD={{ ADMINPASS }}
|
||||
- port_bindings:
|
||||
|
||||
Reference in New Issue
Block a user