Move the repo key to follow the guide.

This commit is contained in:
Andrea Dell'Amico 2023-10-26 19:50:52 +02:00
parent e0bade3d63
commit dca8f0fc91
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,6 @@
---
grafana_repo_key: https://apt.grafana.com/gpg.key
grafana_repo: "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main"
grafana_repo: "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main"
grafana_pkg_state: latest
grafana_packages:
- grafana

View File

@ -16,14 +16,22 @@
when: grafana_enabled
tags: [grafana]
block:
- name: Create a directory to store the repo keys
ansible.builtin.file:
dest: /etc/apt/keyrings
state: directory
mode: "0755"
owner: root
group: root
- name: Install the grafana repo key
get_url:
url: "{{ grafana_repo_key }}"
dest: /usr/share/keyrings/grafana.key
dest: /etc/apt/keyrings/grafana.gpg
state: present
owner: root
group: root
mode: 0644
tags: [grafana, grafana_repo_key]
- name: Install the grafana deb repository
apt_repository: