aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp8
-rw-r--r--templates/Debian/sources.list.erb2
-rw-r--r--templates/Ubuntu/sources.list.erb2
3 files changed, 10 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index ea187f3..8588932 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -10,6 +10,14 @@ class apt {
require => undef,
}
+ $real_main_apt_source = $main_apt_source ? {
+ '' => $operatingsystem ? {
+ "Ubuntu" => "http://de.archive.ubuntu.com/ubuntu/",
+ default => "http://ftp.debian.org/debian/",
+ },
+ default => $main_apt_source,
+ }
+
include lsb
config_file {
# include main, security and backports
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index ab029ca..12d1027 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -2,7 +2,7 @@
# all local modifications will be overwritten
# basic <%= lsbdistcodename %>
-deb http://ftp.debian.org/debian/ <%= lsbdistcodename %> main contrib non-free
+deb <%= real_main_apt_source %> <%= lsbdistcodename %> main contrib non-free
# security suppport
<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable") -%>
# There is no security mirror for <%= lsbdistcodename %>
diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb
index a37fffc..2719934 100644
--- a/templates/Ubuntu/sources.list.erb
+++ b/templates/Ubuntu/sources.list.erb
@@ -2,7 +2,7 @@
# all local modifications will be overwritten
# basic <%= lsbdistcodename %>
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> main restricted universe multiverse
+deb <%= real_main_apt_source %> <%= lsbdistcodename %> main restricted universe multiverse
# updates
deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse