diff --git a/manifests/repo.pp b/manifests/repo.pp index 305257f8..2d2fcc62 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, }