From 9179183d80001ba1c69924ad30c05d17ce1a9476 Mon Sep 17 00:00:00 2001 From: GeorgesZ Date: Wed, 22 Nov 2023 07:35:23 -0500 Subject: [PATCH] Use versioncmp --- manifests/repo.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/repo.pp b/manifests/repo.pp index ef9e338..bbd5b4c 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -54,7 +54,7 @@ } } 'RedHat': { - $release_name = if fact('os.release.major') > 7 { "CentOS_${fact('os.release.major')}_Stream" } else { "CentOS_${fact('os.release.major')}" } + $release_name = if versioncmp(fact('os.release.major'), '7') == 1 { "CentOS_${fact('os.release.major')}_Stream" } else { "CentOS_${fact('os.release.major')}" } $libcontainers_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${release_name}/" $crio_url = "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${crio_version}/${release_name}/"