X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsource.pp;h=163a411bb21f426f1ae1f43aeeffc4cd4c188464;hb=43ab92c4768b638edada41b801091af1a839dfba;hp=96c174c05e2539e25066198f3a931e36ac22e6af;hpb=90bade9561bb505b164c97cd5956697dd9b1f4d6;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/source.pp b/manifests/source.pp index 96c174c..163a411 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -1,9 +1,9 @@ # source.pp # add an apt source define apt::source( + $location = undef, $comment = $name, $ensure = present, - $location = '', $release = $::apt::xfacts['lsbdistcodename'], $repos = 'main', $include = {}, @@ -20,6 +20,10 @@ define apt::source( fail('lsbdistcodename fact not available: release parameter required') } + if $ensure == 'present' and ! $location { + fail('cannot create a source entry without specifying a location') + } + $_before = Apt::Setting["list-${title}"] $_include = merge($::apt::include_defaults, $include)