--- - 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"