grafana: override systemd configuration that is not compatible with Ubuntu 18
This commit is contained in:
parent
34c493de3e
commit
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:
|
||||
possible_files:
|
||||
files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||
- "{{ ansible_distribution }}.yaml"
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
- "default.yaml"
|
||||
@ -16,8 +16,17 @@
|
||||
vars:
|
||||
possible_files:
|
||||
files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.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"
|
||||
- "default.yaml"
|
||||
paths:
|
||||
|
Loading…
Reference in New Issue
Block a user