Created
December 4, 2021 18:41
-
-
Save PageotD/ac891eb554090d6b457cf229c5c65193 to your computer and use it in GitHub Desktop.
Simple Ansible role: Grafana
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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