diff options
author | intrigeri <intrigeri@boum.org> | 2010-10-17 02:01:48 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-10-17 02:08:17 +0200 |
commit | b4d6f30faee423c5b544a1d44724890dcb5418a8 (patch) | |
tree | 9c5a88146595d10a1b508fec1eb2840e7f2cfaf6 | |
parent | bcfb35c969de53aa2972a9d2415be5a258a01be8 (diff) | |
download | puppet-apt-b4d6f30faee423c5b544a1d44724890dcb5418a8.tar.gz puppet-apt-b4d6f30faee423c5b544a1d44724890dcb5418a8.tar.bz2 |
Support $apt_repos for Ubuntu as well.
-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 -%> |