7 $release = $::apt::xfacts['lsbdistcodename'],
12 $architecture = undef,
13 $allow_unsigned = false,
15 validate_string($architecture, $comment, $location, $repos)
16 validate_bool($allow_unsigned)
17 validate_hash($include)
20 fail('lsbdistcodename fact not available: release parameter required')
23 if $ensure == 'present' and ! $location {
24 fail('cannot create a source entry without specifying a location')
27 $_before = Apt::Setting["list-${title}"]
28 $_include = merge($::apt::include_defaults, $include)
33 fail('key hash must contain at least an id entry')
35 $_key = merge($::apt::source_key_defaults, $key)
42 apt::setting { "list-${name}":
44 content => template('apt/_header.erb', 'apt/source.list.erb'),
48 # Get the host portion out of the url so we can pin to origin
49 $url_split = split($location, '/')
60 # We do not want to remove keys when the source is absent.
61 if $key and ($ensure == 'present') {
63 apt::key { "Add key: ${_key['id']} from Apt::Source ${title}":
66 server => $_key['server'],
67 content => $_key['content'],
68 source => $_key['source'],
69 options => $_key['options'],
73 apt::key { "Add key: ${_key} from Apt::Source ${title}":