X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fpin.pp;h=bcccf28b7c8058532e30827c172a58f0f171bc1b;hb=913a64e1fd9a383cfa39a2bb7487cb2e76d79fa1;hp=b27ed8ea2ab699678ece5524ac8af4377f836333;hpb=a21c183b723ddf0cf344d2a2334786faf0f1a181;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/pin.pp b/manifests/pin.pp index b27ed8e..bcccf28 100644 --- a/manifests/pin.pp +++ b/manifests/pin.pp @@ -3,7 +3,7 @@ define apt::pin( $ensure = present, - $explanation = "${caller_module_name}: ${name}", + $explanation = undef, $order = undef, $packages = '*', $priority = 0, @@ -20,6 +20,16 @@ define apt::pin( fail('Only integers are allowed in the apt::pin order param') } + if $explanation { + $_explanation = $explanation + } else { + if defined('$caller_module_name') { # strict vars check + $_explanation = "${caller_module_name}: ${name}" + } else { + $_explanation = ": ${name}" + } + } + $pin_release_array = [ $release, $codename,