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