]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Inheritance of apt::params means it can't be private
authorMorgan Haskel <morgan@puppetlabs.com>
Wed, 11 Mar 2015 00:13:31 +0000 (17:13 -0700)
committerMorgan Haskel <morgan@puppetlabs.com>
Wed, 11 Mar 2015 00:16:43 +0000 (17:16 -0700)
Otherwise, if another module has `class { 'apt': }` in it everything
fails, as `$caller_module_name` will be the other module name.

manifests/params.pp

index e3cc8252f99ab34127b221080f5d7b2ffa80cdc0..f4489cdcb5556e45008b62985f493308168126ed 100644 (file)
@@ -1,9 +1,5 @@
 class apt::params {
 
-  if defined('$caller_module_name') and $caller_module_name and $caller_module_name != $module_name {
-    fail('apt::params is a private class and cannot be accessed directly')
-  }
-
   if $::osfamily != 'Debian' {
     fail('This module only works on Debian or derivatives like Ubuntu')
   }