From 8d8a615edaa2072e1dd935dc27d876535dc6405c Mon Sep 17 00:00:00 2001
From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de>
Date: Mon, 4 May 2020 17:32:04 +0200
Subject: [PATCH] zabbix-repo: Configure correct URL for Ubuntu

---
 zabbix-repo/tasks/main.yml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/zabbix-repo/tasks/main.yml b/zabbix-repo/tasks/main.yml
index 13b24f6..c33ee40 100644
--- a/zabbix-repo/tasks/main.yml
+++ b/zabbix-repo/tasks/main.yml
@@ -40,6 +40,25 @@
     - 'deb-src http://repo.zabbix.com/zabbix/{{ zabbix_version }}/debian {{ debian_version }} main'
   notify:
     - update apt cache
+  when:
+    - ansible_distribution == "Debian"
+  tags:
+    - repos
+    - zabbix
+
+- name: ensure apt knows about the current zabbix repo (Ubuntu)
+  apt_repository:
+    repo: "{{ item }}"
+    state: present
+  with_items:
+    # yamllint disable-line rule:line-length
+    - 'deb http://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu {{ ansible_distribution_release }} main'
+    # yamllint disable-line rule:line-length
+    - 'deb-src http://repo.zabbix.com/zabbix/{{ zabbix_version }}/ubuntu {{ ansible_distribution_release }} main'
+  notify:
+    - update apt cache
+  when:
+    - ansible_distribution == "Ubuntu"
   tags:
     - repos
     - zabbix
-- 
GitLab