Commits

Peter Eisentraut  committed 6cdd5c2

Modify APT sources only when running Debian squeeze

  • Participants
  • Parent commits 2269e26

Comments (0)

Files changed (1)

File manifests/pgci.pp

   require => Package['locales-all'],
 }
 
-file { '/etc/apt/sources.list':
-  ensure => absent,
-  notify => Exec['apt_update'],
-}
 
-apt::source { "debian":
-  location => "http://http.debian.net/debian/",
-}
+if $lsbdistcodename == 'squeeze' {
+  # When using Debian squeeze, we need to set up the backports
+  # repository.  For other distributions, it might be best to leave
+  # the APT sources alone.
 
-apt::source { "debian_backports":
-  location => "http://http.debian.net/debian-backports/",
-  release => "$lsbdistcodename-backports",
-}
+  file { '/etc/apt/sources.list':
+    ensure => absent,
+    notify => Exec['apt_update'],
+  }
+
+  apt::source { "debian":
+    location => "http://http.debian.net/debian/",
+  }
+
+  apt::source { "debian_backports":
+    location => "http://http.debian.net/debian-backports/",
+    release => "$lsbdistcodename-backports",
+  }
 
-apt::source { "debian_security":
-  location => "http://security.debian.org/",
-  release => "$lsbdistcodename/updates",
+  apt::source { "debian_security":
+    location => "http://security.debian.org/",
+    release => "$lsbdistcodename/updates",
+  }
 }
 
+
 Exec['apt_update'] -> Package <| |>
 
 file { '/etc/apt/apt.conf.d/10periodic':