summaryrefslogtreecommitdiff
path: root/manifests/params.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2015-10-03 01:18:07 -0400
committerGabriel Filion <gabster@lelutin.ca>2016-06-27 15:41:19 +0200
commit0752201ce40e7bf4a9acdf642b455e1d97e8789f (patch)
tree2e0f8a3c87ee60707d0363cbdcf66eb823c4082d /manifests/params.pp
parent770f8fb5dafa442bc018fa95fcab2fb60d817020 (diff)
push logic behind apt::repos back in apt::params
The logic in specifying the default value for apt::repos is in the wrong place: it should be in apt::params since this is exactly what this latter class is for. There's no special case that can involve making default the value follow the value of another parameter so there's no point in having that logic in the main class.
Diffstat (limited to 'manifests/params.pp')
-rw-r--r--manifests/params.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index be7262d..a70dac1 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -13,7 +13,17 @@ class apt::params () {
}
$lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
- $repos = 'auto'
+ case $::operatingsystem {
+ 'debian': {
+ $repos = 'main contrib non-free'
+ }
+ 'ubuntu': {
+ $repos = 'main restricted universe multiverse'
+ }
+ default: {
+ fail("Unsupported system '${::operatingsystem}'.")
+ }
+ }
$custom_preferences = ''
$custom_key_dir = false
}