Skip to content

Instantly share code, notes, and snippets.

@PageotD
Created December 4, 2021 18:41
Show Gist options
  • Save PageotD/ac891eb554090d6b457cf229c5c65193 to your computer and use it in GitHub Desktop.
Save PageotD/ac891eb554090d6b457cf229c5c65193 to your computer and use it in GitHub Desktop.
Simple Ansible role: Grafana
---
- name: 'Install Grafana dependencies'
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- gnupg2
state: 'present'
- name: Add Grafana GPG apt Key
apt_key:
url: https://packages.grafana.com/gpg.key
state: present
- name: Add Grafana Repository
apt_repository:
repo: deb https://packages.grafana.com/oss/deb stable main
state: present
- name: Update cache and install Grafana
apt:
update_cache: yes
name: grafana
state: latest
- name: Enable grafana systemd service
service:
name: grafana-server
state: started
enabled: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment