Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPHC-Puppet
yum
Commits
8fffe8e5
Commit
8fffe8e5
authored
Jan 22, 2018
by
Emmanuel Medernach
Browse files
Groups for packages added
parent
571be85b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
0 deletions
+103
-0
README.md
README.md
+12
-0
files/yum-cron-hourly.conf
files/yum-cron-hourly.conf
+25
-0
files/yum-cron.conf
files/yum-cron.conf
+25
-0
manifests/config.pp
manifests/config.pp
+38
-0
manifests/init.pp
manifests/init.pp
+3
-0
No files found.
README.md
View file @
8fffe8e5
...
...
@@ -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
...
...
files/yum-cron-hourly.conf
0 → 100644
View file @
8fffe8e5
[
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
files/yum-cron.conf
0 → 100644
View file @
8fffe8e5
[
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
manifests/config.pp
View file @
8fffe8e5
...
...
@@ -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
,
}
}
}
manifests/init.pp
View file @
8fffe8e5
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment