diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 2 | ||||
-rw-r--r-- | manifests/params.pp | 2 | ||||
-rw-r--r-- | manifests/sources_list.pp | 8 |
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, } } |