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

Modifications pour CentOS 8

parent baf7be40
......@@ -6,35 +6,61 @@ class yum::config {
mode => "0755",
}
file { "/etc/yum.conf":
# file { "/etc/yum.conf":
file { $yum::configuration:
owner => 'root',
group => 'root',
mode => '0644',
content => template('yum/yum.conf.erb'),
}
if $yum::autoupdate {
ensure_packages(['yum-cron'], { ensure => 'installed' })
file { "/etc/yum/yum-cron.conf":
if $yum::stream {
file { "/etc/$yum::version/vars/stream":
ensure => present,
source => "puppet:///modules/yum/yum-cron.conf",
owner => 'root',
group => 'root',
mode => '0644',
content => $yum::stream,
}
}
if $yum::autoupdate {
case $yum::version {
'yum': {
file { "/etc/yum/yum-cron-hourly.conf":
ensure => present,
source => "puppet:///modules/yum/yum-cron-hourly.conf",
owner => 'root',
group => 'root',
mode => '0644',
}
ensure_packages(['yum-cron'], { ensure => 'installed' })
service { 'yum-cron':
ensure => running,
enable => true,
file { "/etc/yum/yum-cron.conf":
ensure => present,
source => "puppet:///modules/yum/yum-cron.conf",
owner => 'root',
group => 'root',
mode => '0644',
}
file { "/etc/yum/yum-cron-hourly.conf":
ensure => present,
source => "puppet:///modules/yum/yum-cron-hourly.conf",
owner => 'root',
group => 'root',
mode => '0644',
}
service { 'yum-cron':
ensure => running,
enable => true,
}
}
'dnf': {
ensure_packages(['dnf-automatic'], { ensure => 'installed' })
service { 'dnf-automatic.timer':
ensure => running,
enable => true,
}
}
}
}
......@@ -48,6 +74,7 @@ class yum::config {
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 }
......@@ -57,6 +84,7 @@ class yum::config {
}
$newlistofrepos.each |$repos| {
# notify {" ${repos} ":}
create_resources(yumrepo, $repos)
}
}
......
......@@ -2,10 +2,13 @@ class yum(
$reposdir, # Repository directory
$autoupdate,
$exclude = '',
String $configuration = '/etc/yum.conf',
String $version = 'yum',
$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)
$stream = undef,
) {
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