From dd45182218ad1ab4bcb89458fe56fd1acc0fd307 Mon Sep 17 00:00:00 2001 From: David Swan Date: Tue, 12 May 2020 11:38:24 +0100 Subject: [PATCH] (maint) - facts fix for centos --- manifests/init.pp | 2 +- manifests/params.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 2a4d1329..fef57d10 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -483,7 +483,7 @@ } } - if ($facts['os']['name'] == 'CentOS') and (versioncmp($facts['os']['release']['full'], '7') < 0) { + if ($facts['os']['name'] == 'CentOS') and (versioncmp($facts['os']['release']['major'], '7') < 0) { fail(translate('This module only works on CentOS version 7 and higher based systems.')) } diff --git a/manifests/params.pp b/manifests/params.pp index 40cdeaae..3c100124 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -199,13 +199,13 @@ $service_after_override = undef $use_upstream_package_source = true - $package_ce_source_location = "https://download.docker.com/linux/centos/${facts['os']['release']['full']}/${facts['os']['architecture']}/${docker_ce_channel}" + $package_ce_source_location = "https://download.docker.com/linux/centos/${facts['os']['release']['major']}/${facts['os']['architecture']}/${docker_ce_channel}" $package_ce_key_source = 'https://download.docker.com/linux/centos/gpg' $package_ce_key_id = undef $package_ce_release = undef $package_key_id = undef $package_release = undef - $package_source_location = "https://yum.dockerproject.org/repo/main/centos/${facts['os']['release']['full']}" + $package_source_location = "https://yum.dockerproject.org/repo/main/centos/${facts['os']['release']['major']}" $package_key_source = 'https://yum.dockerproject.org/gpg' $package_key_check_source = true $package_ee_source_location = $docker_ee_source_location