From db9ccac47bfd49d2f023a4c1745d406e890aa7f9 Mon Sep 17 00:00:00 2001 From: jackdpeterson Date: Mon, 5 Jun 2023 10:39:44 -0700 Subject: [PATCH] support 2.5.x --- manifests/params.pp | 18 ++++++++++++++++++ manifests/repo.pp | 12 ++++++++++++ 2 files changed, 30 insertions(+) diff --git a/manifests/params.pp b/manifests/params.pp index 6ba9ad89..8ba241a8 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -76,6 +76,16 @@ 'server' => 'keyserver.ubuntu.com', }, } + $repo25 = { + comment => 'ProxySQL 2.5.x APT repository', + location => "http://repo.proxysql.com/ProxySQL/proxysql-2.5.x/${facts['os']['distro']['codename']}/", + release => './', + repos => '', + key => { + 'id' => '1448BF693CA600C799EB935804A562FB79953B49', + 'server' => 'keyserver.ubuntu.com', + }, + } } 'RedHat': { $package_provider = 'rpm' @@ -132,6 +142,14 @@ gpgcheck => true, gpgkey => 'http://repo.proxysql.com/ProxySQL/repo_pub_key', } + $repo25 = { + name => 'proxysql_2_5', + descr => 'ProxySQL 2.5.x YUM repository', + baseurl => "http://repo.proxysql.com/ProxySQL/proxysql-2.5.x/centos/${repo_os_major_version}", + enabled => true, + gpgcheck => true, + gpgkey => 'http://repo.proxysql.com/ProxySQL/repo_pub_key', + } } default: { fail("osfamily ${facts['os']['family']} is not supported") diff --git a/manifests/repo.pp b/manifests/repo.pp index 8708964e..f7e2d794 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -6,6 +6,8 @@ if $proxysql::manage_repo and !$proxysql::package_source { $repo = $proxysql::version ? { + /^2\.5\./ => $proxysql::params::repo25, + /^2\.4\./ => $proxysql::params::repo24, /^2\.3\./ => $proxysql::params::repo23, /^2\.2\./ => $proxysql::params::repo22, /^2\.1\./ => $proxysql::params::repo21, @@ -26,6 +28,16 @@ } # Purge old/unnecessary repos. + if ($proxysql::version !~ /^2\.5\./) { + yumrepo { $proxysql::params::repo25['name']: + ensure => absent, + } + } + if ($proxysql::version !~ /^2\.4\./) { + yumrepo { $proxysql::params::repo24['name']: + ensure => absent, + } + } if ($proxysql::version !~ /^2\.3\./) { yumrepo { $proxysql::params::repo23['name']: ensure => absent,