Compare commits
2 Commits
34c493de3e
...
59c5347ffb
Author | SHA1 | Date | |
---|---|---|---|
59c5347ffb | |||
1b42645bd3 |
10
roles/grafana/files/Ubuntu-18-override.conf
Normal file
10
roles/grafana/files/Ubuntu-18-override.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Service]
|
||||||
|
SystemCallFilter=
|
||||||
|
SystemCallFilter=~@privileged
|
||||||
|
SystemCallFilter=~@resources
|
||||||
|
|
||||||
|
ProcSubset=
|
||||||
|
ProtectClock=
|
||||||
|
ProtectHostname=
|
||||||
|
ProtectKernelLogs=
|
||||||
|
ProtectProc=
|
19
roles/grafana/tasks/Ubuntu-18.yaml
Normal file
19
roles/grafana/tasks/Ubuntu-18.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
- name: create grafana-server.service.d
|
||||||
|
file:
|
||||||
|
path: /etc/systemd/system/grafana-server.service.d
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: configure systemd override
|
||||||
|
copy:
|
||||||
|
src: Ubuntu-18-override.conf
|
||||||
|
dest: /etc/systemd/system/grafana-server.service.d/10-override.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
notify:
|
||||||
|
- grafana daemon-reload
|
||||||
|
- restart grafana
|
@ -4,7 +4,7 @@
|
|||||||
vars:
|
vars:
|
||||||
possible_files:
|
possible_files:
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||||
- "{{ ansible_distribution }}.yaml"
|
- "{{ ansible_distribution }}.yaml"
|
||||||
- "{{ ansible_os_family }}.yaml"
|
- "{{ ansible_os_family }}.yaml"
|
||||||
- "default.yaml"
|
- "default.yaml"
|
||||||
@ -16,8 +16,17 @@
|
|||||||
vars:
|
vars:
|
||||||
possible_files:
|
possible_files:
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||||
- "{{ ansible_distribution }}.yaml"
|
- "{{ ansible_distribution }}.yaml"
|
||||||
|
- "default.yaml"
|
||||||
|
paths:
|
||||||
|
- tasks
|
||||||
|
|
||||||
|
- name: include os family specific tasks
|
||||||
|
include_tasks: "{{ lookup('first_found', possible_files) }}"
|
||||||
|
vars:
|
||||||
|
possible_files:
|
||||||
|
files:
|
||||||
- "{{ ansible_os_family }}.yaml"
|
- "{{ ansible_os_family }}.yaml"
|
||||||
- "default.yaml"
|
- "default.yaml"
|
||||||
paths:
|
paths:
|
||||||
|
@ -32,9 +32,9 @@ server {
|
|||||||
{% if grafana_ssl_enabled is defined and
|
{% if grafana_ssl_enabled is defined and
|
||||||
grafana_ssl_enabled %}
|
grafana_ssl_enabled %}
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl http2;
|
||||||
{% if ansible_all_ipv6_addresses | length %}
|
{% if ansible_all_ipv6_addresses | length %}
|
||||||
listen [::]:443 ssl;
|
listen [::]:443 ssl http2;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
server_name {{ grafana_domain }};
|
server_name {{ grafana_domain }};
|
||||||
|
|
||||||
@ -51,6 +51,8 @@ server {
|
|||||||
ssl_dhparam {{ grafana_ssl_dhparam }};
|
ssl_dhparam {{ grafana_ssl_dhparam }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
|
||||||
location /login {
|
location /login {
|
||||||
limit_req zone=req_grafana_login burst=10;
|
limit_req zone=req_grafana_login burst=10;
|
||||||
proxy_pass http://grafana_backend;
|
proxy_pass http://grafana_backend;
|
||||||
|
Loading…
Reference in New Issue
Block a user