site::aptrepo { 'buildd':
ensure => absent,
}
+
+ if $::lsbdistcodename in [squeeze,wheezy] {
+ $suite = $::lsbdistcodename
+ } else {
+ $suite = 'wheezy'
+ }
+
site::aptrepo { 'buildd.debian.org':
- template => 'buildd/etc/apt/sources.list.d/buildd.list.erb',
- key => 'puppet:///modules/buildd/buildd.debian.org.asc',
- require => Package['apt-transport-https'],
+ key => 'puppet:///modules/buildd/buildd.debian.org.asc',
+ url => 'https://buildd.debian.org/apt/',
+ suite => $suite,
+ components => 'main',
+ require => Package['apt-transport-https'],
+ }
+
+ if $::hostname in [alkman,porpora,zandonai] {
+ site::aptrepo { 'buildd.debian.org-proposed':
+ url => 'https://buildd.debian.org/apt/',
+ suite => "${suite}-proposed",
+ components => 'main',
+ require => Package['apt-transport-https'],
+ }
+ }
+
+ if $::hostname in [krenek] {
+ site::aptrepo { 'buildd.debian.org-experimental':
+ url => 'https://buildd.debian.org/apt/',
+ suite => "${suite}-experimental",
+ components => 'main',
+ require => Package['apt-transport-https'],
+ }
}
# 'bad' extension
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-<%
- builddsuites = %w{squeeze wheezy}
- testingunstable = 'wheezy'
- if builddsuites.include?(lsbdistcodename)
- suite = lsbdistcodename
- else
- suite = testingunstable
- end
-%>
-
-# The buildd default repository.
-deb https://buildd.debian.org/apt/ <%= suite %> main
-
-<% if %w{alkman porpora zandonai}.include?(hostname) -%>
-# Include the current test version too.
-deb https://buildd.debian.org/apt/ <%= suite %>-proposed main
-<% elsif %w{krenek}.include?(hostname) -%>
-deb https://buildd.debian.org/apt/ <%= suite %>-experimental main
-<% end %>
if $::debarchitecture != 'armhf' {
site::aptrepo { 'security':
- template => 'debian-org/etc/apt/sources.list.d/security.list.erb',
+ url => 'http://security.debian.org/',
+ suite => "${::lsbdistcodename}/updates",
+ components => ['main','contrib','non-free']
}
+
site::aptrepo { 'backports.debian.org':
- template => 'debian-org/etc/apt/sources.list.d/backports.debian.org.list.erb',
+ url => 'http://backports.debian.org/debian-backports/',
+ suite => "${::lsbdistcodename}-backports",
+ components => ['main','contrib','non-free']
}
+
site::aptrepo { 'volatile':
- template => 'debian-org/etc/apt/sources.list.d/volatile.list.erb',
+ url => 'http://ftp.debian.org/debian',
+ suite => "${::lsbdistcodename}-updates",
+ components => ['main','contrib','non-free']
}
}
site::aptrepo { 'backports.org':
}
site::aptrepo { 'db.debian.org':
- template => 'debian-org/etc/apt/sources.list.d/debian.org.list.erb',
- key => 'puppet:///modules/debian-org/db.debian.org.asc',
+ url => 'http://db.debian.org/debian-admin',
+ suite => 'lenny',
+ components => 'main',
+ key => 'puppet:///modules/debian-org/db.debian.org.asc',
}
file { '/etc/facter':
class debian-org::proliant {
site::aptrepo { 'debian.restricted':
- template => 'debian-org/etc/apt/sources.list.d/debian.restricted.list.erb',
+ url => 'http://db.debian.org/debian-admin',
+ suite => 'lenny-restricted',
+ components => 'non-free',
}
package { 'hpacucli':
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://backports.debian.org/debian-backports/ <%= lsbdistcodename %>-backports main contrib non-free
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://db.debian.org/debian-admin lenny main
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://db.debian.org/debian-admin lenny-restricted non-free
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://db.debian.org/debian-admin lenny-bind-geoip main
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://security.debian.org/ <%= lsbdistcodename %>/updates main contrib non-free
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-deb http://ftp.debian.org/debian <%= lsbdistcodename %>-updates main contrib non-free
}
site::aptrepo { 'debian.restricted':
- template => 'debian-org/etc/apt/sources.list.d/debian.restricted.list.erb',
+ url => 'http://db.debian.org/debian-admin',
+ suite => 'lenny-restricted',
+ components => 'non-free',
}
}
}
site::aptrepo { 'geoip':
- template => 'debian-org/etc/apt/sources.list.d/geoip.list.erb',
+ url => 'http://db.debian.org/debian-admin',
+ suite => 'lenny-bind-geoip',
+ components => 'main',
}
file { '/etc/bind/':
-define site::aptrepo ($key = undef, $keyid = undef, $template = undef, $config = undef, $ensure = present) {
+define site::aptrepo (
+ $url,
+ $suite,
+ $components=[],
+ $key = undef,
+ $keyid = undef,
+ $ensure = present
+) {
case $ensure {
present: {
default: { fail ( "Unknown ensure value: '$ensure'" ) }
}
- if $ensure == present {
- if ! ($config or $template) {
- fail ( "No configuration found for ${name}" )
- }
- }
-
- if $template {
- file { "/etc/apt/sources.list.d/${name}.list":
+ file { "/etc/apt/sources.list.d/${name}.list":
ensure => $ensure,
- content => template($template),
+ content => template('site/aptrepo.erb'),
notify => Exec['apt-get update'],
- }
- } else {
- file { "/etc/apt/sources.list.d/${name}.list":
- ensure => $ensure,
- source => $config,
- notify => Exec['apt-get update'],
- }
}
}
--- /dev/null
+##
+### THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+### USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+###
+
+deb <%= scope.lookupvar('url') %> <%= scope.lookupvar('suite') %> <%= scope.lookupvar('components').to_a.join(' ') %>