Skip to content

Commit

Permalink
Add to the repo definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdpeterson committed Jun 5, 2023
1 parent 94d97d0 commit 27d5feb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 27d5feb

Please sign in to comment.