33 lines
787 B
Puppet
33 lines
787 B
Puppet
# setup a reposync syncer
|
|
class profiles::reposync::syncer {
|
|
|
|
include profiles::reposync::autosyncer
|
|
include profiles::reposync::autopromoter
|
|
include profiles::reposync::webserver
|
|
|
|
# Ensure the reposync config path exists
|
|
file { '/etc/reposync':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
}
|
|
file { '/etc/reposync/conf.d':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
purge => true,
|
|
recurse => true,
|
|
force => true,
|
|
}
|
|
|
|
# get a list of repos as a hash, and iterate through them
|
|
$repos = lookup('profiles::reposync::repos_list', {})
|
|
$repos.each | String $name, Hash $repo_hash | {
|
|
profiles::reposync::repos { $name:
|
|
* => $repo_hash,
|
|
}
|
|
}
|
|
}
|