Files
ansible/grafana/tasks/main.yaml

27 lines
683 B
YAML
Raw Normal View History

2026-01-02 19:08:13 -05:00
- name: Install dependencies
become: true
ansible.builtin.apt:
name: gpg
state: latest
2026-01-02 19:06:29 -05:00
- 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:
2026-01-02 19:10:43 -05:00
name: grafana-server
2026-01-02 19:06:29 -05:00
state: restarted
enabled: true