Commit de550e8c authored by Emmanuel Medernach's avatar Emmanuel Medernach
Browse files

autoupdate et gestion des repository

parent bb7a532f
......@@ -39,5 +39,28 @@ class yum::config {
enable => true,
}
}
# file { '/tmp/debug.yum':
# owner => 'root',
# group => 'root',
# mode => '0644',
# content => template('yum/debug.erb'),
# }
if (is_array($yum::repositories[$yum::profile])) {
$listofrepos = array2hash($yum::repositories[$yum::profile], $yum::description)
$newlistofrepos = $listofrepos.map |$key, $value| {
if (has_key($value, 'descr')) {
{ $key => $value }
} else {
{ $key => $value + {'descr' => 'Missing descr field in yum::description entry'} }
}
}
$newlistofrepos.each |$repos| {
create_resources(yumrepo, $repos)
}
}
}
class yum(
$reposdir, # Repository directory
$autoupdate,
$distroversionpackage, # distroverpkg variable from yum.conf
$exclude = '',
$distroversionpackage, # distroverpkg variable from yum.conf
$repositories, # List of repositories to be installed
$description, # List of all available repositories
$profile, # Profile type (set of repositories to install)
) {
include yum::config
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment