$custom_sources_list
--------------------
-By default this module will use a basic apt/sources.list with a
-generic debian mirror. If you need to set more specific sources,
-e.g. for country proximity, proxies, etc. you can set this variable to
-the location of your sources.list template. For example, setting the
-following variable before including this class will pull in the
-templates/apt/sources.list file:
+By default this module will use a basic apt/sources.list.
+If you need to set more specific sources, e.g. for proxies, etc. you
+can set this variable to the location of your sources.list template.
+For example, setting the following variable before including this
+class will pull in the templates/apt/sources.list file:
$custom_sources_list ='template("apt/sources.list")'
$custom_preferences
By default this is false for backward compatibility with older
versions of this module.
+$apt_debian_url, $apt_security_url, $apt_backports_url, $apt_volatile_url
+-------------------------------------------------------------------------
+
+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.
+
Classes
=======
Enable debian-archive-keyring handling for sarge, lenny and sid.
-Enable selection of country-specific mirrors.
-
Currently this module updates the caches on every run. Running dselect update is
a expensive operation and should be done only on schedule by using apticron.
Sometimes -- especially when initially starting management or deploying new
default => $apt_use_next_release,
}
+ $debian_url = $apt_debian_url ? {
+ '' => 'http://ftp.debian.org/debian/',
+ default => "${apt_debian_url}",
+ }
+ $security_url = $apt_security_url ? {
+ '' => 'http://security.debian.org/',
+ default => "${apt_security_url}",
+ }
+ $backports_url = $apt_backports_url ? {
+ '' => 'http://backports.debian.org/debian-backports/',
+ default => "${apt_backports_url}",
+ }
+ $volatile_url = $apt_volatile_url ? {
+ '' => 'http://volatile.debian.org/debian-volatile/',
+ default => "${apt_volatile_url}",
+ }
+
package { apt:
ensure => installed,
require => undef,
### Debian current: <%= codename %>
# basic
-deb http://ftp.debian.org/debian/ <%= codename %> <%= repos %>
+deb <%= debian_url > <%= codename %> <%= repos %>
<% if include_src then %>
-deb-src http://ftp.debian.org/debian/ <%= codename %> <%= repos %>
+deb-src <%= debian_url > <%= codename %> <%= repos %>
<% end %>
# security
<% if (release == "unstable" || release == "experimental") %>
# There is no security support for <%= release %>
<% else %>
-deb http://security.debian.org/ <%= codename %>/updates <%= repos %>
+deb <%= security_url > <%= codename %>/updates <%= repos %>
<% if include_src then %>
-deb-src http://security.debian.org/ <%= codename %>/updates <%= repos %>
+deb-src <%= security_url > <%= codename %>/updates <%= repos %>
<% end %>
<% end %>
<% if (release == "testing" || release == "unstable" || release == "experimental") %>
# There is no backports archive for <%= release %>
<% else %>
-deb http://backports.debian.org/debian-backports/ <%= codename %>-backports <%= repos %>
+deb <%= backports_url > <%= codename %>-backports <%= repos %>
<% if include_src then %>
-deb-src http://backports.debian.org/debian-backports/ <%= codename %>-backports <%= repos %>
+deb-src <%= backports_url > <%= codename %>-backports <%= repos %>
<% end %>
<% end %>
<% if (release == "testing" || release == "unstable" || release == "experimental") %>
# There is no volatile archive for <%= release %>
<% else %>
-deb http://volatile.debian.org/debian-volatile/ <%= codename %>/volatile <%= repos %>
+deb <%= volatile_url > <%= codename %>/volatile <%= repos %>
<% if include_src then %>
-deb-src http://volatile.debian.org/debian-volatile/ <%= codename %>/volatile <%= repos %>
+deb-src <%= volatile_url > <%= codename %>/volatile <%= repos %>
<% end %>
<% end %>
<% end %>
### Debian next: <%= next_codename %>
# basic
-deb http://ftp.debian.org/debian/ <%= next_codename %> <%= repos %>
+deb <%= debian_url > <%= next_codename %> <%= repos %>
<% if include_src then %>
-deb-src http://ftp.debian.org/debian/ <%= next_codename %> <%= repos %>
+deb-src <%= debian_url > <%= next_codename %> <%= repos %>
<% end %>
# security
<% if (next_release == "unstable" || next_release == "experimental") %>
# There is no security support for <%= next_release %>
<% else %>
-deb http://security.debian.org/ <%= next_codename %>/updates <%= repos %>
+deb <%= security_url > <%= next_codename %>/updates <%= repos %>
<% if include_src then %>
-deb-src http://security.debian.org/ <%= next_codename %>/updates <%= repos %>
+deb-src <%= security_url > <%= next_codename %>/updates <%= repos %>
<% end %>
<% end %>
<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") %>
# There is no backports archive for <%= next_release %>
<% else %>
-deb http://backports.debian.org/debian-backports/ <%= next_codename %>-backports <%= repos %>
+deb <%= backports_url > <%= next_codename %>-backports <%= repos %>
<% if include_src then %>
-deb-src http://backports.debian.org/debian-backports/ <%= next_codename %>-backports <%= repos %>
+deb-src <%= backports_url > <%= next_codename %>-backports <%= repos %>
<% end %>
<% end %>
<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") %>
# There is no volatile archive for <%= next_release %>
<% else %>
-deb http://volatile.debian.org/debian-volatile/ <%= next_codename %>/volatile <%= repos %>
+deb <%= volatile_url > <%= next_codename %>/volatile <%= repos %>
<% if include_src then %>
-deb-src http://volatile.debian.org/debian-volatile/ <%= next_codename %>/volatile <%= repos %>
+deb-src <%= volatile_url > <%= next_codename %>/volatile <%= repos %>
<% end %>
<% end %>
<% end %>