From 76d86fb6013a30cbb9c582f69b6a9c02968c7a91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net>
Date: Mon, 13 May 2024 23:31:52 +0200
Subject: [PATCH] Remove Ubuntu support, Add debian 12 support

---
 meta/main.yml     |  4 ++--
 tasks/install.yml | 23 ++++++++++-------------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/meta/main.yml b/meta/main.yml
index 06fb8bf..1c6df69 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -5,7 +5,7 @@ galaxy_info:
   license: Apache-2.0
   min_ansible_version: "2.9"
   platforms:
-    - name: Ubuntu
+    - name: Debian
       versions:
-        - all
+        - 12
 dependencies: []
diff --git a/tasks/install.yml b/tasks/install.yml
index 1ef4aeb..aac8ae1 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -1,25 +1,22 @@
 ---
+- name: Add HAProxy apt key
+  ansible.builtin.apt_key:
+    url: https://haproxy.debian.net/bernat.debian.org.gpg
+    state: present
 
-- name: Add HAProxy 2.9 PPA
+- name: Add HAProxy apt repository
   ansible.builtin.apt_repository:
-    repo: 'ppa:vbernat/haproxy-2.9'
+    repo: 'deb [signed-by=AEF2348766F371C689A7360095A42FE8353525F9] http://haproxy.debian.net bookworm-backports-2.9 main'
+    filename: haproxy-2.9
     state: present
 
-- name: Remove old HAProxy PPAs
+- name: Remove old HAProxy apt repositories
   ansible.builtin.apt_repository:
-    repo: "ppa:vbernat/haproxy-{{ item }}"
+    repo: "deb [signed-by=AEF2348766F371C689A7360095A42FE8353525F9] http://haproxy.debian.net bookworm-backports-{{ item }} main"
+    filename: haproxy-{{ item }}
     state: absent
   loop:
     - "2.8"
-    - "2.7"
-    - "2.6"
-    - "2.5"
-    - "2.4"
-    - "2.3"
-    - "2.2"
-    - "2.1"
-    - "2.0"
-    - "1.8"
 
 - name: Install HAProxy
   ansible.builtin.apt:
-- 
GitLab