X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fbackports.pp;h=0fa69586e78089a3e38a867b59b2e4ffcc0be79c;hb=9618422523b894126484959a39f18158ea5c91f9;hp=62927cdac7d1dada0a720dfac5b72a67a55a1e9e;hpb=d6069a619ce1b30f19014932f81e83f445c846e6;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/backports.pp b/manifests/backports.pp index 62927cd..0fa6958 100644 --- a/manifests/backports.pp +++ b/manifests/backports.pp @@ -64,24 +64,23 @@ class apt::backports ( if $key { $_key = $key } - if ($facts['lsbdistid'] == 'Debian' or $facts['lsbdistid'] == 'Ubuntu') { - unless $location { - $_location = $::apt::backports['location'] - } - unless $release { - $_release = "${facts['lsbdistcodename']}-backports" - } - unless $repos { - $_repos = $::apt::backports['repos'] - } - unless $key { - $_key = $::apt::backports['key'] - } - } else { + if (!($facts['lsbdistid'] == 'Debian' or $facts['lsbdistid'] == 'Ubuntu')) { unless $location and $release and $repos and $key { fail(translate('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')) } } + unless $location { + $_location = $::apt::backports['location'] + } + unless $release { + $_release = "${facts['lsbdistcodename']}-backports" + } + unless $repos { + $_repos = $::apt::backports['repos'] + } + unless $key { + $_key = $::apt::backports['key'] + } if $pin =~ Hash { $_pin = $pin