monitoring/mqtt_exporter: Install from debian package
Some checks failed
Test / build (push) Failing after 59s

This commit is contained in:
polyfloyd 2025-04-27 13:08:31 +02:00
parent bb5f845c1b
commit ee6b8bee5c
9 changed files with 47 additions and 33 deletions

View file

@ -0,0 +1 @@
deb_private_host: git.polyfloyd.net

View file

@ -0,0 +1,3 @@
---
- ansible.builtin.import_tasks:
file: ../../common/handlers/main.yaml

View file

@ -0,0 +1,26 @@
---
- tags: deb_forgejo
block:
- name: Install dependencies
apt:
name: apt-transport-https
state: present
- name: Install packaging key
get_url:
url: https://{{ item.host }}/api/packages/{{ item.owner }}/debian/repository.key
dest: /etc/apt/keyrings/{{ item.host }}-{{ item.owner }}.asc
mode: "0644"
with_items: "{{ deb_forgejo_repos }}"
notify: apt update
- name: Install sources.list
template:
src: sources.list
dest: /etc/apt/sources.list.d/deb-forgejo.list
owner: root
group: root
mode: "0644"
notify: apt update
- meta: flush_handlers

View file

@ -0,0 +1,5 @@
# {{ ansible_managed }}
{% for repo in deb_forgejo_repos %}
deb [signed-by=/etc/apt/keyrings/{{ repo.host }}-{{ repo.owner }}.asc] https://{{ repo.host }}/api/packages/{{ repo.owner }}/debian {{ repo.distro | default('stable') }} {{ repo.component | default('main') }}
{% endfor %}