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
94d3462c
Commit
94d3462c
authored
Aug 10, 2018
by
Emmanuel Medernach
Browse files
Correction du 'name' manquant (yumrepo utilise descr pour remplir name)
parent
d39fed6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
README.md
README.md
+4
-0
manifests/config.pp
manifests/config.pp
+11
-1
No files found.
README.md
View file @
94d3462c
...
...
@@ -26,8 +26,11 @@ yum::grouplist:
# yum repositories description
Note: descr is mandatory (yumrepo use descr to populate the repository name attribute)
yum::description:
linuxtech-release:
descr: Linuxtech release
baseurl:
http://linuxsoft.cern.ch/linuxtech/el6/release/
http://pkgrepo.linuxtech.net/el6/release/
...
...
@@ -38,6 +41,7 @@ yum::description:
metadata_expire: 7d
skip_if_unavailable: 0
linuxtech-testing:
descr: Linuxtech testing
baseurl:
http://linuxsoft.cern.ch/linuxtech/el6/testing/
http://pkgrepo.linuxtech.net/el6/testing/
...
...
manifests/config.pp
View file @
94d3462c
...
...
@@ -10,7 +10,17 @@ class yum::config {
if
(
is_array
(
$yum::repositories
[
$yum::profile
]))
{
$listofrepos
=
array2hash
(
$yum::repositories
[
$yum::profile
],
$yum::description
)
create_resources
(
yumrepo
,
$listofrepos
)
$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
)
}
}
$yum::groups
.
each
|
$group
|
{
...
...
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