Merge pull request #657 from puppetlabs/binford2k-patch-1
[puppet-modules/puppetlabs-apt.git] / manifests / conf.pp
1 define apt::conf (
2   Optional[String] $content          = undef,
3   Enum['present', 'absent'] $ensure  = present,
4   Variant[String, Integer] $priority = 50,
5   Optional[Boolean] $notify_update   = undef,
6 ) {
7
8   unless $ensure == 'absent' {
9     unless $content {
10       fail('Need to pass in content parameter')
11     }
12   }
13
14   $confheadertmp = epp('apt/_conf_header.epp')
15   apt::setting { "conf-${name}":
16     ensure        => $ensure,
17     priority      => $priority,
18     content       => "${confheadertmp}${content}",
19     notify_update => $notify_update,
20   }
21 }