Simplify codename handling.
Have the codename class parameter default to $::lsbdistcodename, and derive $release from it.
This commit is contained in:
parent
aac83e728c
commit
17f67d9fac
1 changed files with 2 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
|||
# See LICENSE for the full license granted to you.
|
||||
|
||||
class apt(
|
||||
$codename = '',
|
||||
$codename = $::lsbdistcodename,
|
||||
$use_volatile = false,
|
||||
$include_src = false,
|
||||
$use_next_release = false,
|
||||
|
@ -39,12 +39,8 @@ class apt(
|
|||
|
||||
include lsb
|
||||
|
||||
# init $release, $next_release, $codename, $next_codename, $release_version
|
||||
# init $release, $next_release, $next_codename, $release_version
|
||||
case $codename {
|
||||
'': {
|
||||
$codename = $::lsbdistcodename
|
||||
$release = $::lsbdistrelease
|
||||
}
|
||||
'n/a': {
|
||||
fail("Unknown lsbdistcodename reported by facter: '$lsbdistcodename', please fix this by setting this variable in your manifest.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue