feat: change to use local mirror

- change almalinux and epel *.repo files on nodes to use local package mirror
- add option to purge yumrepo resources, default to true
- add versionlocking to yum, enable it for puppet-agent
This commit is contained in:
2023-11-12 16:17:48 +11:00
parent 1b78904588
commit cc77cc7ded
9 changed files with 69 additions and 46 deletions
+14
View File
@@ -29,6 +29,20 @@ class profiles::puppet::client (
ensure => $puppet_version,
}
# if puppet-version is anything other than latest, set a versionlock
$puppet_versionlock_ensure = $puppet_version ? {
'latest' => 'absent',
default => 'present',
}
$puppet_versionlock_version = $puppet_version ? {
'latest' => undef,
default => $puppet_version,
}
yum::versionlock{'puppet-agent':
ensure => $puppet_versionlock_ensure,
version => $puppet_versionlock_version,
}
# Ensure the puppet service is running
service { 'puppet':
ensure => 'running',