- deep merge yumrepo resources
- convert repos to direct yumrepo in hieradata
- change from repos.main.unkin.net to edgecache.query.consul
- create all yumrepo resources from $profiles:😋:global::repos
36 lines
816 B
Puppet
36 lines
816 B
Puppet
# Class: profiles::yum::global
|
|
#
|
|
# This class manages global YUM configurations and optionally includes the
|
|
# base and EPEL yum repository profiles based on the content of the
|
|
# $managed_repos parameter, which is an array of repository names.
|
|
class profiles::yum::global (
|
|
Hash $repos = {},
|
|
Boolean $purge = true,
|
|
){
|
|
class { 'yum':
|
|
keep_kernel_devel => true,
|
|
clean_old_kernels => true,
|
|
config_options => {
|
|
gpgcheck => true,
|
|
},
|
|
}
|
|
|
|
resources { 'yumrepo':
|
|
purge => $purge,
|
|
}
|
|
|
|
# create repos
|
|
create_resources('yumrepo', $repos)
|
|
|
|
# makecache if changes made to repos
|
|
exec {'dnf_makecache':
|
|
command => 'dnf makecache -q',
|
|
path => ['/usr/bin', '/bin'],
|
|
refreshonly => true,
|
|
}
|
|
|
|
# setup dnf-autoupdate
|
|
include profiles::yum::autoupdater
|
|
|
|
}
|