Simplify conditional expressions

This commit is contained in:
Jerome Charaoui 2015-10-09 14:08:46 -04:00 committed by Gabriel Filion
parent f492e5840b
commit 4d3b720308

View file

@ -98,17 +98,15 @@ class apt(
# backports uses the normal archive key now
package { 'debian-backports-keyring': ensure => absent }
if $use_backports {
if (${::debian_release} != "testing" and ${::debian_release} != "unstable" and ${::debian_release} != "experimental") {
if ($use_backports and !($::debian_release in ['testing', 'unstable', 'experimental'])) {
apt::sources_list {
'backports':
content => "deb $backports_url ${::debian_codename}-backports ${apt::real_repos}",
}
if $include_src {
apt::sources_list {
'backports':
content => "deb $backports_url ${::debian_codename}-backports ${apt::real_repos}",
}
if $include_src {
apt::sources_list {
'backports-src':
content => "deb-src $backports_url ${::debian_codename}-backports ${apt::real_repos}",
}
'backports-src':
content => "deb-src $backports_url ${::debian_codename}-backports ${apt::real_repos}",
}
}
}