diff options
author | intrigeri <intrigeri@boum.org> | 2013-01-08 18:13:23 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2013-01-08 18:13:23 +0100 |
commit | 14670466be5eceba043e697d5f6f0f0ada9d5b07 (patch) | |
tree | aa13226508d5658754b6b57c321be0b79f093c6f /manifests | |
parent | 354283d54ea4f03a4ecdb53db2868ec1ced87dbc (diff) |
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 }
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/sources_list.pp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index 00f6097..3367f83 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -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 |