module-apt/manifests/params.pp
Gabriel Filion 0752201ce4 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.
2016-06-27 15:41:19 +02:00

29 lines
819 B
Puppet

class apt::params () {
$use_lts = false
$use_volatile = false
$use_backports = true
$include_src = false
$use_next_release = false
$debian_url = 'http://httpredir.debian.org/debian/'
$security_url = 'http://security.debian.org/'
$ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$backports_url = $::debian_codename ? {
'squeeze' => 'http://backports.debian.org/debian-backports/',
default => false,
}
$lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
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
}