From a8255b9147778767d2e08f965ef9ba8f15074da4 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Sat, 28 Oct 2023 20:15:54 +0200 Subject: [PATCH] move desc and baseurl into yum class, they are not used otherwise --- manifests/repo/nodesource.pp | 4 ---- manifests/repo/nodesource/yum.pp | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/manifests/repo/nodesource.pp b/manifests/repo/nodesource.pp index da3b5f79..42e0a5ac 100644 --- a/manifests/repo/nodesource.pp +++ b/manifests/repo/nodesource.pp @@ -10,10 +10,6 @@ case $facts['os']['family'] { 'RedHat': { - # nodesource repo - $descr = "Node.js Packages - \$basearch" - $baseurl = "https://rpm.nodesource.com/pub_${url_suffix}/nodistro/nodejs/\$basearch" - contain 'nodejs::repo::nodesource::yum' } 'Debian': { diff --git a/manifests/repo/nodesource/yum.pp b/manifests/repo/nodesource/yum.pp index 31f21de4..d2da05b8 100644 --- a/manifests/repo/nodesource/yum.pp +++ b/manifests/repo/nodesource/yum.pp @@ -1,12 +1,11 @@ # PRIVATE CLASS: Do not use directly. class nodejs::repo::nodesource::yum { - $baseurl = $nodejs::repo::nodesource::baseurl - $descr = $nodejs::repo::nodesource::descr $ensure = $nodejs::repo::nodesource::ensure $priority = $nodejs::repo::nodesource::priority $proxy = $nodejs::repo::nodesource::proxy $proxy_password = $nodejs::repo::nodesource::proxy_password $proxy_username = $nodejs::repo::nodesource::proxy_username + $url_suffix = $nodejs::repo::nodesource::url_suffix $yum_failovermethod = (versioncmp($facts['os']['release']['major'], '8') >= 0 and $priority == 'absent') ? { true => 'absent', @@ -38,8 +37,8 @@ # FIXME: REMOVE ABOVE HACK yumrepo { 'nodesource': - descr => $descr, - baseurl => $baseurl, + descr => 'Node.js Packages - \$basearch', + baseurl => "https://rpm.nodesource.com/pub_${url_suffix}/nodistro/nodejs/\$basearch", enabled => '1', failovermethod => $yum_failovermethod, gpgkey => 'file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL',