Control restart via systemd
This commit is contained in:
parent
387ddb8106
commit
1eb01f7c00
4 changed files with 29 additions and 19 deletions
|
@ -1,19 +1,32 @@
|
|||
---
|
||||
- name: "Grafana | Aktivere und starte Service"
|
||||
- name: "Configuration | Aktivere und starte Service"
|
||||
ansible.builtin.systemd:
|
||||
name: grafana-server
|
||||
enabled: true
|
||||
state: started
|
||||
daemon_reload: true
|
||||
|
||||
- name: "Grafana | Erzeuge Grafana-Konfiguration"
|
||||
- name: "Configuration | Erzeuge Grafana-Konfiguration"
|
||||
ansible.builtin.template:
|
||||
src: grafana.ini
|
||||
dest: /etc/grafana/grafana.ini
|
||||
mode: "0640"
|
||||
notify: restart grafana
|
||||
notify: Restart grafana-server
|
||||
|
||||
- name: "Grafana | Installiere Image Renderer Module"
|
||||
- name: "Configuration | Installiere Image Renderer Module"
|
||||
ansible.builtin.command:
|
||||
cmd: grafana-cli plugins install grafana-image-renderer
|
||||
creates: /var/lib/grafana/plugins/grafana-image-renderer
|
||||
|
||||
- name: "Configuration | Create systemd override directory"
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/grafana-server.service.d
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: "Configuration | Copy systemd override configuration"
|
||||
ansible.builtin.copy:
|
||||
src: systemd/override.conf
|
||||
dest: /etc/systemd/system/grafana-server.service.d
|
||||
mode: "0644
|
||||
notify: Restart grafana-server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue