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
de550e8c
Commit
de550e8c
authored
Jan 24, 2019
by
Emmanuel Medernach
Browse files
autoupdate et gestion des repository
parent
bb7a532f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
manifests/config.pp
manifests/config.pp
+23
-0
manifests/init.pp
manifests/init.pp
+4
-1
No files found.
manifests/config.pp
View file @
de550e8c
...
...
@@ -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
)
}
}
}
manifests/init.pp
View file @
de550e8c
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
...
...
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