]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/debian-org/manifests/init.pp
syntax fix
[dsa-puppet.git] / modules / debian-org / manifests / init.pp
index 4d7d63f20cfe54b1fcdbabd26c05a5cbcbd45171..f68ae30b7982817ffe185408c64c2a5c55717ce5 100644 (file)
@@ -1,4 +1,14 @@
 class debian-org {
+       if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
+               $mirror = getfromhash($site::nodeinfo, 'hoster', 'mirror-debian')
+       } else {
+               $mirror = 'http://http.debian.net/debian/'
+       }
+       if $::lsbmajdistrelease < 7 {
+               $mirror_backports = 'http://backports.debian.org/debian-backports/'
+       } else {
+               $mirror_backports = $mirror
+       }
 
        $debianadmin = [
                'debian-archive-debian-samhain-reports@master.debian.org',
@@ -20,6 +30,7 @@ class debian-org {
                        'dsa-munin-plugins',
                ]:
                ensure => installed,
+               tag    => extra_repo,
        }
 
        package { [
@@ -37,7 +48,7 @@ class debian-org {
        }
 
        if $::lsbmajdistrelease >= 7 {
-               package { 'libfilesystem-ruby1.9':
+               package { 'libfilesystem-ruby1.9.1':
                        ensure => installed,
                }
        }
@@ -65,6 +76,7 @@ class debian-org {
        if getfromhash($site::nodeinfo, 'broken-rtc') {
                package { 'fake-hwclock':
                        ensure => installed,
+                       tag    => extra_repo,
                }
        }
 
@@ -88,26 +100,10 @@ class debian-org {
                components => ['main','contrib','non-free']
        }
 
-       if $::lsbdistcodename != 'wheezy' {
-               site::aptrepo { 'backports.debian.org':
-                       url        => 'http://backports.debian.org/debian-backports/',
-                       suite      => "${::lsbdistcodename}-backports",
-                       components => ['main','contrib','non-free']
-               }
-
-               if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
-                       site::aptrepo { 'volatile':
-                               url        => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
-                               suite      => "${::lsbdistcodename}-updates",
-                               components => ['main','contrib','non-free']
-                       }
-               } else {
-                       site::aptrepo { 'volatile':
-                               url        => 'http://ftp.debian.org/debian',
-                               suite      => "${::lsbdistcodename}-updates",
-                               components => ['main','contrib','non-free']
-                       }
-               }
+       site::aptrepo { 'backports.debian.org':
+               url        => $mirror_backports,
+               suite      => "${::lsbdistcodename}-backports",
+               components => ['main','contrib','non-free']
        }
        site::aptrepo { 'backports.org':
                ensure => absent,
@@ -115,6 +111,12 @@ class debian-org {
                key => 'puppet:///modules/debian-org/backports.org.asc',
        }
 
+       site::aptrepo { 'volatile':
+               url        => $mirror,
+               suite      => "${::lsbdistcodename}-updates",
+               components => ['main','contrib','non-free']
+       }
+
        site::aptrepo { 'debian.org':
                ensure => absent,
        }
@@ -229,7 +231,7 @@ class debian-org {
                path        => '/usr/bin:/usr/sbin:/bin:/sbin',
                refreshonly => true,
        }
-       Exec['apt-get update']->Package<| |>
+       Exec['apt-get update']->Package<| tag == extra_repo |>
 
        exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
                path        => '/usr/bin:/usr/sbin:/bin:/sbin',