Commit 8fffe8e5 authored by Emmanuel Medernach's avatar Emmanuel Medernach
Browse files

Groups for packages added

parent 571be85b
......@@ -16,6 +16,16 @@ Restart puppetserver if needed
File yum.yaml:
```
yum::grouplist:
default:
development:
- gcc
- gdb
- make
- cmake
# yum repositories description
yum::description:
linuxtech-release:
baseurl:
......@@ -53,6 +63,8 @@ yum::distroversionpackage: centos-release
yum::profile: base
yum::group: development
yum::packages:
- centos-release
- epel-release
......
[commands]
update_cmd = security
update_messages = yes
download_updates = yes
apply_updates = yes
random_sleep = 360
[emitters]
system_name = None
emit_via = email
output_width = 80
[email]
email_from = root@localhost
email_to = root
email_host = localhost
[groups]
group_list = None
group_package_types = mandatory, default
[base]
debuglevel = -2
mdpolicy = group:main
[commands]
update_cmd = security
update_messages = yes
download_updates = yes
apply_updates = yes
random_sleep = 360
[emitters]
system_name = None
emit_via = email
output_width = 80
[email]
email_from = root@localhost
email_to = root
email_host = localhost
[groups]
group_list = None
group_package_types = mandatory, default
[base]
debuglevel = -2
mdpolicy = group:main
......@@ -10,4 +10,42 @@ class yum::config {
$listofrepos = array2hash($yum::repositories[$yum::profile], $yum::description)
create_resources(yumrepo, $listofrepos)
if (has_key($yum::grouplist, $yum::group)) {
if ($yum::grouplist[$yum::group] != undef) {
package { $yum::grouplist[$yum::group]:
ensure => 'installed',
}
}
} else {
notify {"Warning: yum module: yum::group is absent from yum::grouplist !":}
}
if $yum::autoupdate {
package { "yum-cron":
ensure => 'installed',
}
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,
}
}
}
......@@ -5,6 +5,9 @@ class yum(
$repositories, # List of repositories to be installed
$packages, # List of packages to install
$profile, # Profile type (set of repositories to install)
$autoupdate = false,
$group, # Package group name
$grouplist, # List of package groups
) {
package { $packages:
......
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