X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fconf.pp;h=eea06861d9e3793e807a9e77d5388d0897941d3c;hb=69edb0d6344a7c628c538219aa7b7b01ae131f6f;hp=28502052814b73a238d7fc6704a05ae70811cd47;hpb=dc746734f17faa996e8441d176143945e8347330;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, } }