X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fbackports.pp;h=8555cb0f7a2c68455fbab71b18ee122f5a14bc67;hb=65904b214d98c899f390ac6908322fc06e3aca13;hp=4faad6157a7f31664555471071c211e177e56ce2;hpb=e9dadf5ed3308655d003374c4b2c2f5fe8619c27;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/backports.pp b/manifests/backports.pp index 4faad61..8555cb0 100644 --- a/manifests/backports.pp +++ b/manifests/backports.pp @@ -1,3 +1,4 @@ +# Defining backports for the apt class class apt::backports ( Optional[String] $location = undef, Optional[String] $release = undef, @@ -32,13 +33,13 @@ class apt::backports ( } } else { unless $location and $release and $repos and $key { - fail('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key') + fail(translate('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')) } } - if is_hash($pin) { + if $pin =~ Hash { $_pin = $pin - } elsif is_numeric($pin) or is_string($pin) { + } elsif $pin =~ Numeric or $pin =~ String { # apt::source defaults to pinning to origin, but we should pin to release # for backports $_pin = { @@ -46,7 +47,7 @@ class apt::backports ( 'release' => $_release, } } else { - fail('pin must be either a string, number or hash') + fail(translate('pin must be either a string, number or hash')) } apt::source { 'backports':