- apt::setting { $name:
- ensure => $ensure,
- setting_type => 'list',
- content => template('apt/_header.erb', 'apt/source.list.erb'),
- notify => Exec['apt_update'],
+ if $ensure == 'present' and ! $location {
+ fail('cannot create a source entry without specifying a location')
+ }
+
+ $_before = Apt::Setting["list-${title}"]
+ $_include = merge($::apt::include_defaults, $include)
+
+ if $key {
+ if is_hash($key) {
+ unless $key['id'] {
+ fail('key hash must contain at least an id entry')
+ }
+ $_key = merge($::apt::source_key_defaults, $key)
+ } else {
+ validate_string($key)
+ $_key = $key
+ }
+ }
+
+ apt::setting { "list-${name}":
+ ensure => $ensure,
+ content => template('apt/_header.erb', 'apt/source.list.erb'),