From f4b6799baf3268f7739188da60e7116a1eff0f21 Mon Sep 17 00:00:00 2001
From: Hinrikus Wolf <hinrikus@fsmpi.rwth-aachen.de>
Date: Sat, 21 Oct 2017 18:51:42 +0200
Subject: [PATCH] change zabbix version to 3.4

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

diff --git a/zabbix-repo/tasks/main.yml b/zabbix-repo/tasks/main.yml
index 8c7370b..5e31859 100644
--- a/zabbix-repo/tasks/main.yml
+++ b/zabbix-repo/tasks/main.yml
@@ -3,7 +3,6 @@
 
 - name: ensure apt got the key to verify the zabbix repo
   apt_key: data="{{lookup('file', 'zabbix.gpg')}}" state=present
-  when: debian_version == "jessie"
   notify:
     - update apt cache
   tags:
@@ -11,9 +10,11 @@
     - repos
     - zabbix
 
-- name: ensure apt got the key to verify the zabbix repo
-  apt_key: data="{{lookup('file', 'zabbix.gpg')}}" state=absent
-  when: debian_version == "stretch"
+- name: ensure apt knows about the zabbix repo
+  apt_repository: repo={{ item }} state=absent
+  with_items:
+    - 'deb http://repo.zabbix.com/zabbix/3.0/debian {{ debian_version }} main'
+    - 'deb-src http://repo.zabbix.com/zabbix/3.0/debian {{ debian_version }} main'
   notify:
     - update apt cache
   tags:
@@ -21,24 +22,12 @@
     - repos
     - zabbix
 
+
 - name: ensure apt knows about the zabbix repo
   apt_repository: repo={{ item }} state=present
   with_items:
-    - 'deb http://repo.zabbix.com/zabbix/3.0/debian jessie main'
-    - 'deb-src http://repo.zabbix.com/zabbix/3.0/debian jessie main'
-  when: debian_version == "jessie"
-  notify:
-    - update apt cache
-  tags:
-    - packages
-    - repos
-    - zabbix
-
-- name: ensure we use zabbix from debian
-  file:
-    name: /etc/apt/sources.list.d/repo_zabbix_com_zabbix_3_0_debian.list 
-    state: absent
-  when: debian_version == "stretch"
+    - 'deb http://repo.zabbix.com/zabbix/3.4/debian {{ debian_version }} main'
+    - 'deb-src http://repo.zabbix.com/zabbix/3.4/debian {{debian_version }} main'
   notify:
     - update apt cache
   tags:
-- 
GitLab