Decommission asachi, arm-linaro-01 and arm-linaro-03 (RT#6895)
[mirror/dsa-puppet.git] / modules / debian_org / manifests / apt.pp
index 9fc02a0..48b617e 100644 (file)
@@ -3,7 +3,7 @@
 # Stuff common to all debian.org servers
 #
 class debian_org::apt {
-       if $::lsbmajdistrelease <= '7' {
+       if versioncmp($::lsbmajdistrelease, '7') <= 0 {
                $mungedcodename = $::lsbdistcodename
        } elsif ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
                $mungedcodename = "${::lsbdistcodename}-kfreebsd"
@@ -11,7 +11,7 @@ class debian_org::apt {
                $mungedcodename = $::lsbdistcodename
        }
 
-       if $::lsbmajdistrelease <= '8' {
+       if versioncmp($::lsbmajdistrelease, '8') <= 0 {
                $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/'
        } else {
                $fallbackmirror = 'http://deb.debian.org/debian/'
@@ -28,10 +28,17 @@ class debian_org::apt {
                suite      => [ $mungedcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
                components => ['main','contrib','non-free']
        }
-       site::aptrepo { 'security':
-               url        => [ 'http://security-cdn.debian.org/', 'http://security.anycast-test.mirrors.debian.org/debian-security/', 'http://security.debian.org/' ],
-               suite      => "${mungedcodename}/updates",
-               components => ['main','contrib','non-free']
+
+       if ($::hostname in [smetana]) {
+               site::aptrepo { 'security':
+                       ensure => absent,
+               }
+       } else {
+               site::aptrepo { 'security':
+                       url        => [ 'http://security-cdn.debian.org/', 'http://security.anycast-test.mirrors.debian.org/debian-security/', 'http://security.debian.org/' ],
+                       suite      => "${mungedcodename}/updates",
+                       components => ['main','contrib','non-free']
+               }
        }
 
        if has_role('experimental_apache') {