ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
---

- name: "Delete file: /var/lib/grafana/data/grafana.db"
  file:
    name: /var/lib/grafana/data/grafana.db
    state: absent
  listen: "Delete database and restart grafana"
  notify: "Restart grafana"

- name: "[OpenRC] Restart service: grafana (to deploy config changes)"
  service:
    name: grafana
    state: restarted
  when:
    - ansible_service_mgr == "openrc"
  listen: "Restart grafana"

- name: "[systemd] Restart service: grafana (to deploy config changes)"
  systemd:
    name: grafana
    state: restarted
  when:
    - ansible_service_mgr == "systemd"
  listen: "Restart grafana"