7 $release = $::lsbdistcodename,
12 $key_server = 'keyserver.ubuntu.com',
16 $architecture = undef,
17 $trusted_source = false,
19 validate_string($architecture, $comment, $location, $release, $repos, $key_server)
20 validate_bool($trusted_source, $include_src, $include_deb)
23 fail('lsbdistcodename fact not available: release parameter required')
26 file { "${name}.list":
28 path => "${::apt::sources_list_d}/${name}.list",
32 content => template('apt/_header.erb', 'apt/source.list.erb'),
33 notify => Exec['apt_update'],
38 # Get the host portion out of the url so we can pin to origin
39 $url_split = split($location, '/')
45 before => File["${name}.list"],
50 # We do not want to remove keys when the source is absent.
51 if $key and ($ensure == 'present') {
52 apt::key { "Add key: ${key} from Apt::Source ${title}":
55 key_server => $key_server,
56 key_content => $key_content,
57 key_source => $key_source,
58 before => File["${name}.list"],
62 # Need anchor to provide containment for dependencies.
63 anchor { "apt::source::${name}":
64 require => Class['apt::update'],