diff options
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 |