aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-20 16:09:44 -0500
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-20 16:09:44 -0500
commite3e0b46ca6039170c2d2faa8b2bebf14460679eb (patch)
tree2f255b0f4d109afeb15d870f2151ec9da0100ba0 /manifests
parentc9ae59e1b72d41518160ff4c7b430573b10254a3 (diff)
parent7c55bee06ab952c914b3a367f495e36a2539807f (diff)
downloadpuppet-apt-e3e0b46ca6039170c2d2faa8b2bebf14460679eb.tar.gz
puppet-apt-e3e0b46ca6039170c2d2faa8b2bebf14460679eb.tar.bz2
Merge branch 'master' of gitlab.com:shared-puppet-modules-group/apt
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/params.pp2
-rw-r--r--manifests/sources_list.pp8
3 files changed, 9 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 7550aaa..2814013 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,12 +5,14 @@
class apt(
$codename = $apt::params::codename,
+ $use_lts = $apt::params::use_lts,
$use_volatile = $apt::params::use_volatile,
$include_src = $apt::params::include_src,
$use_next_release = $apt::params::use_next_release,
$debian_url = $apt::params::debian_url,
$security_url = $apt::params::security_url,
$backports_url = $apt::params::backports_url,
+ $lts_url = $apt::params::lts_url,
$volatile_url = $apt::params::volatile_url,
$ubuntu_url = $apt::params::ubuntu_url,
$repos = $apt::params::repos,
diff --git a/manifests/params.pp b/manifests/params.pp
index 12273ac..54fd13e 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -1,5 +1,6 @@
class apt::params () {
$codename = $::lsbdistcodename
+ $use_lts = false
$use_volatile = false
$include_src = false
$use_next_release = false
@@ -9,6 +10,7 @@ class apt::params () {
'wheezy' => $debian_url,
default => 'http://backports.debian.org/debian-backports/',
}
+ $lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
$ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$repos = 'auto'
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,
}
}