New deb repository.

This commit is contained in:
Andrea Dell'Amico 2023-01-30 18:32:32 +01:00
parent 30805a91ba
commit 13e4ee8540
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 13 additions and 4 deletions

View File

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

View File

@ -13,10 +13,19 @@
tags: [grafana] tags: [grafana]
- block: - block:
- name: Install the grafana repo key - name: Install the grafana repo key
apt_key: url={{ grafana_repo_key }} state=present get_url:
url: "{{ grafana_repo_key }}"
dest: /usr/share/keyrings/grafana.key
state: present
owner: root
group: root
mode: 0644
- name: Install the grafana deb repository - name: Install the grafana deb repository
apt_repository: repo='{{ grafana_repo }}' state=present update_cache=yes apt_repository:
repo: "{{ grafana_repo }}"
state: present
update_cache: true
- name: Install the grafana deb packages - name: Install the grafana deb packages
apt: name={{ grafana_packages }} state={{ grafana_pkg_state }} update_cache=yes cache_valid_time=1800 apt: name={{ grafana_packages }} state={{ grafana_pkg_state }} update_cache=yes cache_valid_time=1800