diff options
-rw-r--r-- | manifests/init.pp | 16 | ||||
-rw-r--r-- | templates/Ubuntu/sources.list.erb | 16 |
2 files changed, 21 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 8136f25..ab90c90 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,9 +44,19 @@ class apt { '' => 'http://volatile.debian.org/debian-volatile/', default => "${apt_volatile_url}", } - $repos = $apt_repos ? { - '' => 'main contrib non-free', - default => "${apt_repos}", + case $operatingsystem { + 'debian': { + $repos = $apt_repos ? { + '' => 'main contrib non-free', + default => "${apt_repos}", + } + } + 'ubuntu': { + $repos = $apt_repos ? { + '' => 'main restricted universe multiverse', + default => "${apt_repos}", + } + } } package { apt: diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb index 36fc150..328d9e2 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 %> main restricted universe multiverse +deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> <%= repos %> <% if include_src then -%> -deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> main restricted universe multiverse +deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> <%= repos %> <% end -%> # updates -deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse +deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates <%= repos %> <% if include_src then -%> -deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse +deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates <%= repos %> <% end -%> # security suppport -deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse +deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security <%= repos %> <% if include_src then -%> -deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse +deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security <%= repos %> <% end -%> # backports -deb http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main universe multiverse restricted +deb http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main <%= repos %> <% if include_src then -%> -deb-src http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main universe multiverse restricted +deb-src http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports <%= repos > <% end -%> |