X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsource.pp;h=163a411bb21f426f1ae1f43aeeffc4cd4c188464;hb=913a64e1fd9a383cfa39a2bb7487cb2e76d79fa1;hp=9b3405797a83b5734619ff300fca1f6006d99714;hpb=c57d2dd5ddafe26bd17727ab184b00fb8a166a2a;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/source.pp b/manifests/source.pp index 9b34057..163a411 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -1,26 +1,31 @@ # source.pp # add an apt source define apt::source( + $location = undef, $comment = $name, $ensure = present, - $location = '', $release = $::apt::xfacts['lsbdistcodename'], $repos = 'main', - $include_src = false, - $include_deb = true, + $include = {}, $key = undef, $pin = false, $architecture = undef, - $trusted_source = false, + $allow_unsigned = false, ) { validate_string($architecture, $comment, $location, $repos) - validate_bool($trusted_source, $include_src, $include_deb) + 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) if $key { if is_hash($key) {