Merge pull request 'fix: yumrepo purging' (#34) from neoloc/yumresources into develop
Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/34
This commit was merged in pull request #34.
This commit is contained in:
@@ -34,7 +34,6 @@ class profiles::defaults {
|
||||
ensure => 'present',
|
||||
enabled => 1,
|
||||
gpgcheck => 1,
|
||||
mirrorlist => 'absent',
|
||||
require => Class['profiles::pki::vaultca'],
|
||||
notify => Exec['dnf_makecache'],
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ class profiles::yum::global (
|
||||
purge => $purge,
|
||||
}
|
||||
|
||||
exec {'purge_almalinux_default_repos':
|
||||
command => 'rm -f /etc/yum.repos.d/almalinux*.repo',
|
||||
path => ['/bin', '/usr/bin'],
|
||||
onlyif => 'find /etc/yum.repos.d/ -type f -name *almalinux* | grep .',
|
||||
before => Resources['yumrepo'],
|
||||
}
|
||||
#exec {'purge_almalinux_default_repos':
|
||||
# command => 'rm -f /etc/yum.repos.d/almalinux*.repo',
|
||||
# path => ['/bin', '/usr/bin'],
|
||||
# onlyif => 'find /etc/yum.repos.d/ -type f -name *almalinux* | grep .',
|
||||
# before => Resources['yumrepo'],
|
||||
#}
|
||||
|
||||
# download all gpg keys if a repo defines it
|
||||
$repos.each |$name, $repo| {
|
||||
@@ -36,11 +36,12 @@ class profiles::yum::global (
|
||||
before => Yumrepo[$name],
|
||||
}
|
||||
}
|
||||
# create the repo
|
||||
yumrepo { $name:
|
||||
* => $repo,
|
||||
}
|
||||
}
|
||||
|
||||
# create repos
|
||||
create_resources('yumrepo', $repos)
|
||||
|
||||
# makecache if changes made to repos
|
||||
exec {'dnf_makecache':
|
||||
command => 'dnf makecache -q',
|
||||
|
||||
Reference in New Issue
Block a user