From f1047125850383ba19a668c97142c17e6d697ecd Mon Sep 17 00:00:00 2001 From: David Cachau Date: Sat, 14 Dec 2024 23:35:24 +0100 Subject: [PATCH] Repository URL change since Zabbix 7.2 --- manifests/repo.pp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/manifests/repo.pp b/manifests/repo.pp index 305257f8..435cf00a 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -37,7 +37,12 @@ } $_repo_location = $repo_location ? { - undef => "https://repo.zabbix.com/zabbix/${zabbix_version}/rhel/${majorrelease}/\$basearch/", + undef => versioncmp($zabbix_version, '7.2') ? { + # Version older than 7.2 + '-1' => "https://repo.zabbix.com/zabbix/${zabbix_version}/stable/rhel/${majorrelease}/\$basearch/", + # Version 7.2 and newer + default => "https://repo.zabbix.com/zabbix/${zabbix_version}/rhel/${majorrelease}/\$basearch/", + }, default => $repo_location, } @@ -87,7 +92,12 @@ } $_repo_location = $repo_location ? { - undef => "http://repo.zabbix.com/zabbix/${zabbix_version}/${operatingsystem}/", + undef => versioncmp($zabbix_version, '7.2') ? { + # Version older than 7.2 + '-1' => "http://repo.zabbix.com/zabbix/${zabbix_version}/${operatingsystem}/", + # Version 7.2 and newer + default => "http://repo.zabbix.com/zabbix/${zabbix_version}/stable/${operatingsystem}/", + }, default => $repo_location, }