summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2014-12-06 15:57:39 +0000
committerMicah <micah@riseup.net>2014-12-06 15:57:39 +0000
commit77ae6e98bec8cf0bb6e69a125dad0e8e734daa01 (patch)
tree18a5474bbf3bb1c2485e5eccd8b0045ed5d0fc49
parent93858f31f0bf3f29277802058fd07f6e3801492b (diff)
parent7c68c19973518841ba2462371b9d4b4d4f1da37e (diff)
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
-rw-r--r--manifests/sources_list.pp8
1 files changed, 5 insertions, 3 deletions
diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp
index 3367f83..aefad2d 100644
--- a/manifests/sources_list.pp
+++ b/manifests/sources_list.pp
@@ -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,
}
}