projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9573712
)
check url and suite only if ensure => present
author
Stephen Gran
<steve@lobefin.net>
Wed, 2 May 2012 07:57:33 +0000
(08:57 +0100)
committer
Stephen Gran
<steve@lobefin.net>
Wed, 2 May 2012 07:57:33 +0000
(08:57 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/site/manifests/aptrepo.pp
patch
|
blob
|
history
diff --git
a/modules/site/manifests/aptrepo.pp
b/modules/site/manifests/aptrepo.pp
index
c97fade
..
52036ed
100644
(file)
--- a/
modules/site/manifests/aptrepo.pp
+++ b/
modules/site/manifests/aptrepo.pp
@@
-1,6
+1,6
@@
define site::aptrepo (
- $url,
- $suite,
+ $url
=''
,
+ $suite
=''
,
$components=[],
$key = undef,
$keyid = undef,
@@
-45,6
+45,15
@@
define site::aptrepo (
default: { fail ( "Unknown ensure value: '$ensure'" ) }
}
+ case $ensure {
+ present: {
+ if !($url and $suite) {
+ fail ( "Need both url and suite for $name" )
+ }
+ }
+ default: {}
+ }
+
file { "/etc/apt/sources.list.d/${name}.list":
ensure => $ensure,
content => template('site/aptrepo.erb'),