From ef2152d714f36f552429ea5bfb14035e351c1816 Mon Sep 17 00:00:00 2001 From: Moshe Hyzon Date: Wed, 6 Dec 2017 15:36:42 -0500 Subject: [PATCH 1/2] Fix repo URL for RHEL 7[1]. Enable gpgcheck and add in gitlab-ee key. [1] yum $releasever is 7Server in RHEL, but 7 in centos --- manifests/install.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 2b773d15..9cb60119 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -51,13 +51,18 @@ } 'redhat': { + $gpgkey = $edition ? { + 'ee' => 'https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-3D645A26AB9FBD22.pub.gpg', + default => 'https://packages.gitlab.com/gpg.key', + } + yumrepo { "gitlab_official_${edition}": descr => 'Official repository for Gitlab', - baseurl => "https://packages.gitlab.com/gitlab/gitlab-${edition}/el/\$releasever/\$basearch", + baseurl => "https://packages.gitlab.com/gitlab/gitlab-${edition}/el/${::os_version_major}/\$basearch", enabled => 1, - gpgcheck => 0, - gpgkey => 'https://packages.gitlab.com/gpg.key', repo_gpgcheck => 1, + gpgcheck => 1, + gpgkey => $gpgkey, sslcacert => '/etc/pki/tls/certs/ca-bundle.crt', sslverify => 1, } From 9088ccc0393960c2841bf0a9b24959b87a20e2a6 Mon Sep 17 00:00:00 2001 From: Moshe Hyzon Date: Thu, 7 Dec 2017 15:14:10 -0500 Subject: [PATCH 2/2] Use a core facter fact --- manifests/install.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 9cb60119..50b26a37 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -58,7 +58,7 @@ yumrepo { "gitlab_official_${edition}": descr => 'Official repository for Gitlab', - baseurl => "https://packages.gitlab.com/gitlab/gitlab-${edition}/el/${::os_version_major}/\$basearch", + baseurl => "https://packages.gitlab.com/gitlab/gitlab-${edition}/el/${::operatingsystemmajrelease}/\$basearch", enabled => 1, repo_gpgcheck => 1, gpgcheck => 1,