aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-10-09 14:08:46 -0400
committerGabriel Filion <gabster@lelutin.ca>2015-12-04 12:36:25 -0500
commit4d3b720308964c027674bb08c49f142b4684ff58 (patch)
treefe0ca230c260dad294de1c89495a5f3d453b1b50
parentf492e5840b3d2122e347ead5d1c240e794120d0e (diff)
downloadpuppet-apt-4d3b720308964c027674bb08c49f142b4684ff58.tar.gz
puppet-apt-4d3b720308964c027674bb08c49f142b4684ff58.tar.bz2
Simplify conditional expressions
-rw-r--r--manifests/init.pp18
1 files changed, 8 insertions, 10 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 16593c7..2660612 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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}",
}
}
}