]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Support choosing a custom Ubuntu mirror.
authorintrigeri <intrigeri@boum.org>
Sun, 17 Oct 2010 08:51:06 +0000 (10:51 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 17 Oct 2010 08:51:06 +0000 (10:51 +0200)
README
manifests/init.pp
templates/Ubuntu/sources.list.erb

diff --git a/README b/README
index b786b9d53f99a3a826c3b13e795c815c855439fa..8c32ca46c6037f6b87124e0ffdbf48d60a6f6789 100644 (file)
--- 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
 ----------
 
index 82eb231d629f9a13165c0b1a0870b3452f9a34f6..f3c8845f209f8f13021cb47533605aa00d75bb4b 100644 (file)
@@ -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 ? {
index 328d9e256b86bf27041322ee66a24dc093b4c602..1486e95d7f651578fef4ad4d510c0e7aaa86f38e 100644 (file)
@@ -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 -%>