2018-12-06 02:59:47 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Create /etc/grafana and /var/lib/grafana
|
|
|
|
ansible.builtin.file:
|
2018-12-06 02:59:47 +08:00
|
|
|
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
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Include_tasks systemd.yml
|
|
|
|
ansible.builtin.include_tasks: systemd.yml
|
2019-05-16 16:56:06 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Start the grafana-server service
|
|
|
|
ansible.builtin.systemd:
|
2019-05-16 16:56:06 +08:00
|
|
|
name: grafana-server
|
|
|
|
state: started
|
2024-02-14 18:14:02 +08:00
|
|
|
enabled: true
|
|
|
|
daemon_reload: true
|
2019-08-23 02:29:40 +08:00
|
|
|
failed_when: false
|