grafana: override systemd configuration that is not compatible with Ubuntu 18

This commit is contained in:
Ryan Cavicchioni 2022-08-30 07:08:39 -05:00
parent 34c493de3e
commit 1b42645bd3
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
3 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,10 @@
[Service]
SystemCallFilter=
SystemCallFilter=~@privileged
SystemCallFilter=~@resources
ProcSubset=
ProtectClock=
ProtectHostname=
ProtectKernelLogs=
ProtectProc=

View 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

View File

@ -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: