Add Grafana
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
hosts: monitoring
|
||||
roles:
|
||||
- prometheus
|
||||
- grafana
|
||||
|
||||
21
grafana/tasks/main.yaml
Normal file
21
grafana/tasks/main.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
- name: Download Grafana GPG keys
|
||||
become: true
|
||||
ansible.builtin.get_url:
|
||||
url: https://apt.grafana.com/gpg.key
|
||||
dest: /etc/apt/keyrings/grafana.gpg
|
||||
- name: Add Grafana repository
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main"
|
||||
state: present
|
||||
- name: Install Grafana
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name: grafana
|
||||
state: latest
|
||||
- name: Start Grafana
|
||||
become: true
|
||||
ansible.builtin.systemd_service:
|
||||
name: grafana
|
||||
state: restarted
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user