Don't check for source / content to be set when removing an APT source.

Else, the sanity checks prevent one from using a simple
  apt::sources_list { "sid.list": ensure => absent }
This commit is contained in:
intrigeri 2013-01-08 18:13:23 +01:00
parent 354283d54e
commit 14670466be

View file

@ -4,11 +4,13 @@ define apt::sources_list (
$content = undef
) {
if $source == '' and $content == undef {
fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}")
}
if $source != '' and $content != undef {
fail("Only one of \$source or \$content must specified for apt_sources_snippet ${name}")
if $ensure == 'present' {
if $source == '' and $content == undef {
fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}")
}
if $source != '' and $content != undef {
fail("Only one of \$source or \$content must specified for apt_sources_snippet ${name}")
}
}
include apt::dot_d_directories