summaryrefslogtreecommitdiffstats
path: root/roles/grafana/tasks/install-debian.yml
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-09-19 14:51:56 +0200
committerAhmed Abdelhalim <[email protected]>2025-09-19 14:51:56 +0200
commit60f9e792540cd3d56fb0329bf30fb4eb9ad9cf64 (patch)
treeb79d9f5044441bd2a27ae922e2e87c6b52043000 /roles/grafana/tasks/install-debian.yml
parent0460ecb3cfefc67a79d46d6d8f56676d77c9f507 (diff)
Add Grafana role
Diffstat (limited to 'roles/grafana/tasks/install-debian.yml')
-rw-r--r--roles/grafana/tasks/install-debian.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/grafana/tasks/install-debian.yml b/roles/grafana/tasks/install-debian.yml
new file mode 100644
index 00000000..42eb44bf
--- /dev/null
+++ b/roles/grafana/tasks/install-debian.yml
@@ -0,0 +1,25 @@
+---
+- name: "Download Grafana GPG key"
+ become: true
+ ansible.builtin.get_url:
+ url: "https://apt.grafana.com/gpg.key"
+ dest: "/etc/apt/trusted.gpg.d/grafana.asc"
+ mode: "0644"
+
+- name: "Add Grafana repository"
+ become: true
+ ansible.builtin.apt_repository:
+ repo: "deb [signed-by=/etc/apt/trusted.gpg.d/grafana.asc] https://apt.grafana.com stable main"
+ state: "present"
+ filename: "grafana"
+
+- name: "Update package cache"
+ become: true
+ ansible.builtin.apt:
+ update_cache: true
+
+- name: "Install grafana"
+ become: true
+ ansible.builtin.package:
+ name: "grafana"
+ state: "present"