Merge branch 'append_list' into 'master'

Append list

I've implemented #6200 in a backwards-compatible manner: this change makes ending sources in ".list" optional

See merge request !2
This commit is contained in:
Micah 2014-12-06 15:57:39 +00:00
commit 77ae6e98be

View file

@ -15,22 +15,24 @@ define apt::sources_list (
include apt::dot_d_directories
$realname = regsubst($name, '\.list$', '')
# One would expect the 'file' resource on sources.list.d to trigger an
# apt-get update when files are added or modified in the directory, but it
# apparently doesn't.
file { "/etc/apt/sources.list.d/${name}":
file { "/etc/apt/sources.list.d/${realname}.list":
ensure => $ensure,
owner => root, group => 0, mode => '0644',
notify => Exec['refresh_apt'],
}
if $source {
File["/etc/apt/sources.list.d/${name}"] {
File["/etc/apt/sources.list.d/${realname}.list"] {
source => $source,
}
}
else {
File["/etc/apt/sources.list.d/${name}"] {
File["/etc/apt/sources.list.d/${realname}.list"] {
content => $content,
}
}