- exec { "${name} apt update":
- command => "${apt::params::provider} update",
- subscribe => File["${name}.list"],
- refreshonly => true,
+ $includes = merge($::apt::include_defaults, $include)
+
+ if $key {
+ if $key =~ Hash {
+ unless $key['id'] {
+ fail('key hash must contain at least an id entry')
+ }
+ $_key = merge($::apt::source_key_defaults, $key)
+ } else {
+ $_key = { 'id' => assert_type(String[1], $key) }
+ }
+ }
+
+ $header = epp('apt/_header.epp')
+
+ $sourcelist = epp('apt/source.list.epp', {
+ 'comment' => $comment,
+ 'includes' => $includes,
+ 'opt_architecture' => $architecture,
+ 'allow_unsigned' => $allow_unsigned,
+ 'location' => $location,
+ 'release' => $_release,
+ 'repos' => $repos,
+ })
+
+ apt::setting { "list-${name}":
+ ensure => $ensure,
+ content => "${header}${sourcelist}",
+ notify_update => $notify_update,