deploy grafana

This commit is contained in:
Nicole O'Connor 2024-08-14 10:31:11 -07:00
parent e6cbaa5fc2
commit f997a4f22e

26
deploy-grafana.yaml Normal file
View File

@ -0,0 +1,26 @@
---
- name: Setup Grafana
become: true
tasks:
- name: "Download Grafana Repository Key"
# HACK: apt_key has been deprecated, and its current (2023) replacement appears to be nothing
#ansible.builtin.apt_key:
# url: https://download.grafana.com/linux/ubuntu/gpg
# id: 7EA0A9C3F273FCD8
# state: present
ansible.builtin.get_url:
url: https://apt.grafana.com/gpg.key
dest: /tmp/grafana.gpg.armor
- name: "Add Grafana Repository Key"
ansible.builtin.shell:
cmd: gpg --dearmor -o /etc/apt/keyrings/grafana.gpg < /tmp/grafana.gpg.armor
creates: /etc/apt/keyrings/grafana.gpg
- name: "Add Grafana Repository"
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main"
filename: grafana
state: present
- name: "Install Grafana packages"
ansible.builtin.apt:
name:
- grafana-enterprise