2018-12-06 02:59:47 +08:00
|
|
|
---
|
|
|
|
- name: create /etc/grafana and /var/lib/grafana
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ grafana_uid }}"
|
2019-07-31 04:09:47 +08:00
|
|
|
group: "{{ grafana_uid }}"
|
2018-12-06 02:59:47 +08:00
|
|
|
recurse: true
|
|
|
|
with_items:
|
|
|
|
- /etc/grafana
|
|
|
|
- /var/lib/grafana
|
|
|
|
|
2020-04-17 00:17:12 +08:00
|
|
|
- name: include_tasks systemd.yml
|
|
|
|
include_tasks: systemd.yml
|
2019-05-16 16:56:06 +08:00
|
|
|
|
|
|
|
- name: start the grafana-server service
|
|
|
|
systemd:
|
|
|
|
name: grafana-server
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
daemon_reload: yes
|
2019-08-23 02:29:40 +08:00
|
|
|
failed_when: false
|