X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsource.pp;h=163a411bb21f426f1ae1f43aeeffc4cd4c188464;hb=43ab92c4768b638edada41b801091af1a839dfba;hp=1ceaba96ceb5aae6ed5ec967b59e60e176cbb0f2;hpb=a220dcf08c84208d08d6f96b8aee7c7f70ae83a1;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/source.pp b/manifests/source.pp index 1ceaba9..163a411 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -1,25 +1,29 @@ # source.pp # add an apt source define apt::source( + $location = undef, $comment = $name, $ensure = present, - $location = '', $release = $::apt::xfacts['lsbdistcodename'], $repos = 'main', $include = {}, $key = undef, $pin = false, $architecture = undef, - $trusted_source = false, + $allow_unsigned = false, ) { validate_string($architecture, $comment, $location, $repos) - validate_bool($trusted_source) + validate_bool($allow_unsigned) validate_hash($include) unless $release { 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)