summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README6
-rw-r--r--manifests/init.pp4
-rw-r--r--templates/Ubuntu/sources.list.erb16
3 files changed, 18 insertions, 8 deletions
diff --git a/README b/README
index b786b9d..8c32ca4 100644
--- a/README
+++ b/README
@@ -112,6 +112,12 @@ These variables allow to override the default APT mirrors respectively
used for the standard Debian archives, the Debian security archive,
the Debian official backports and the Debian Volatile archive.
+$apt_ubuntu_url
+---------------
+
+These variables allows to override the default APT mirror used for all
+standard Ubuntu archives (including updates, security, backports).
+
$apt_repos
----------
diff --git a/manifests/init.pp b/manifests/init.pp
index 82eb231..f3c8845 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -44,6 +44,10 @@ class apt {
'' => 'http://volatile.debian.org/debian-volatile/',
default => "${apt_volatile_url}",
}
+ $ubuntu_url = $apt_ubuntu_url ? {
+ '' => 'http://archive.ubuntu.com/ubuntu',
+ default => "${apt_ubuntu_url}",
+ }
case $operatingsystem {
'debian': {
$repos = $apt_repos ? {
diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb
index 328d9e2..1486e95 100644
--- a/templates/Ubuntu/sources.list.erb
+++ b/templates/Ubuntu/sources.list.erb
@@ -1,25 +1,25 @@
# This file is brought to you by puppet
# basic <%= lsbdistcodename %>
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> <%= repos %>
+deb <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
<% if include_src then -%>
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> <%= repos %>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
<% end -%>
# updates
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates <%= repos %>
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
<% if include_src then -%>
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates <%= repos %>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
<% end -%>
# security suppport
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security <%= repos %>
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
<% if include_src then -%>
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security <%= repos %>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
<% end -%>
# backports
-deb http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main <%= repos %>
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-backports main <%= repos %>
<% if include_src then -%>
-deb-src http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports <%= repos >
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-backports <%= repos >
<% end -%>