Merge 40f33c777a
into b863646e71
This commit is contained in:
commit
d8a717e23e
5 changed files with 84 additions and 2 deletions
grafana
|
@ -20,7 +20,11 @@ logs = {{ server.path.logs }}
|
|||
#################################### Server ####################################
|
||||
[server]
|
||||
# Protocol (http or https)
|
||||
{%- if 'protocol' in server %}
|
||||
protocol = {{ server.protocol }}
|
||||
{%- else %}
|
||||
;protocol = http
|
||||
{% endif %}
|
||||
|
||||
# The ip address to bind to, empty will bind to all interfaces
|
||||
http_addr = {{ server.bind.address }}
|
||||
|
@ -29,14 +33,22 @@ http_addr = {{ server.bind.address }}
|
|||
http_port = {{ server.bind.port }}
|
||||
|
||||
# The public facing domain name used to access grafana from a browser
|
||||
{%- if 'domain' in server %}
|
||||
domain = {{ server.domain }}
|
||||
{%- else %}
|
||||
;domain = localhost
|
||||
{%- endif %}
|
||||
|
||||
# Redirect to correct domain if host header does not match domain
|
||||
# Prevents DNS rebinding attacks
|
||||
;enforce_domain = false
|
||||
|
||||
# The full public facing url
|
||||
{%- if 'root_url' in server %}
|
||||
root_url = {{ server.root_url }}
|
||||
{%- else %}
|
||||
;root_url = %(protocol)s://%(domain)s:%(http_port)s/
|
||||
{%- endif %}
|
||||
|
||||
# Log web requests
|
||||
;router_logging = false
|
||||
|
|
|
@ -12,9 +12,9 @@ port = {{ ldap_params.port }}
|
|||
use_ssl = {{ ldap_params.use_ssl|lower }}
|
||||
|
||||
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
|
||||
start_tls = false
|
||||
start_tls = {{ ldap_params.start_tls|lower }}
|
||||
# set to true if you want to skip ssl cert validation
|
||||
ssl_skip_verify = false
|
||||
ssl_skip_verify = {{ ldap_params.ssl_skip_verify|lower }}
|
||||
# set to the path to your root CA certificate or leave unset to use system defaults
|
||||
# root_ca_cert = /path/to/certificate.crt
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
{%- if pillar.grafana is defined %}
|
||||
include:
|
||||
{%- if grafana.manage_repo and grains['os_family'] == 'RedHat' %}
|
||||
- grafana.repo.redhat
|
||||
{%- endif %}
|
||||
{%- if pillar.grafana.server is defined %}
|
||||
- grafana.server
|
||||
{%- endif %}
|
||||
|
|
|
@ -26,6 +26,55 @@ Debian:
|
|||
host: '127.0.0.1'
|
||||
port: 389
|
||||
use_ssl: false
|
||||
start_tls: false
|
||||
ssl_skip_verify: false
|
||||
bind_dn: "cn=admin,dc=grafana,dc=org"
|
||||
bind_password: "grafana"
|
||||
user_search_filter: "(cn=%s)"
|
||||
user_search_base_dns:
|
||||
- "dc=grafana,dc=org"
|
||||
servers:
|
||||
attributes:
|
||||
name: "givenName"
|
||||
surname: "sn"
|
||||
username: "cn"
|
||||
member_of: "memberOf"
|
||||
email: "email"
|
||||
admin:
|
||||
user: admin
|
||||
password: admin
|
||||
allow_sign_up: False
|
||||
allow_org_create: False
|
||||
auto_assign_role: Viewer
|
||||
dir:
|
||||
static: /usr/share/grafana/public
|
||||
dashboards:
|
||||
enabled: false
|
||||
RedHat:
|
||||
pkgs:
|
||||
- grafana
|
||||
service: grafana-server
|
||||
user: grafana
|
||||
group: grafana
|
||||
path:
|
||||
home: /usr/share/grafana
|
||||
data: /var/lib/grafana
|
||||
logs: /var/log/grafana
|
||||
pid_file_dir: /var/run/grafana
|
||||
bind:
|
||||
address: 0.0.0.0
|
||||
port: 3000
|
||||
session:
|
||||
engine: file
|
||||
auth:
|
||||
engine: application
|
||||
ldap:
|
||||
enabled: false
|
||||
host: '127.0.0.1'
|
||||
port: 389
|
||||
use_ssl: false
|
||||
start_tls: false
|
||||
ssl_skip_verify: false
|
||||
bind_dn: "cn=admin,dc=grafana,dc=org"
|
||||
bind_password: "grafana"
|
||||
user_search_filter: "(cn=%s)"
|
||||
|
@ -61,6 +110,14 @@ Debian:
|
|||
engine: none
|
||||
datasource: {}
|
||||
dashboard: {}
|
||||
RedHat:
|
||||
server:
|
||||
host: 127.0.0.1
|
||||
port: 3000
|
||||
remote_data:
|
||||
engine: none
|
||||
datasource: {}
|
||||
dashboard: {}
|
||||
{%- endload %}
|
||||
|
||||
{%- set client = salt['grains.filter_by'](client_defaults, merge=salt['pillar.get']('grafana:client')) %}
|
||||
|
|
10
grafana/repo/redhat.sls
Normal file
10
grafana/repo/redhat.sls
Normal file
|
@ -0,0 +1,10 @@
|
|||
grafana:
|
||||
pkgrepo.managed:
|
||||
- humanname: 'grafana'
|
||||
- name: 'grafana'
|
||||
- baseurl: 'https://packagecloud.io/grafana/stable/el/7/$basearch'
|
||||
- enabled: 1
|
||||
- gpgcheck: 1
|
||||
- gpgkey: https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
|
||||
- sslverify: 1
|
||||
- sslcacert: /etc/pki/tls/certs/ca-bundle.crt
|
Loading…
Add table
Reference in a new issue