X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fconf.pp;h=eea06861d9e3793e807a9e77d5388d0897941d3c;hb=d7af638793b6f5b6c5af6562923fa9ee0b025e1d;hp=28502052814b73a238d7fc6704a05ae70811cd47;hpb=a21c183b723ddf0cf344d2a2334786faf0f1a181;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/conf.pp b/manifests/conf.pp index 2850205..eea0686 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -1,11 +1,21 @@ define apt::conf ( - $content, - $ensure = present, - $priority = '50', + Optional[String] $content = undef, + Enum['present', 'absent'] $ensure = present, + Variant[String, Integer] $priority = 50, + Optional[Boolean] $notify_update = undef, ) { + + unless $ensure == 'absent' { + unless $content { + fail('Need to pass in content parameter') + } + } + + $confheadertmp = epp('apt/_conf_header.epp') apt::setting { "conf-${name}": - ensure => $ensure, - priority => $priority, - content => template('apt/_header.erb', 'apt/conf.erb'), + ensure => $ensure, + priority => $priority, + content => "${confheadertmp}${content}", + notify_update => $notify_update, } }