Currently, it's either we use the default source that's hardcoded in the
sources.list template or we redefine entirely this template.
Make it easier to just change the URL of the apt source while using the
rest of the default template by adding a $main_apt_source variable.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
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
# 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 %>
# 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