Issue #11158 has been updated by Sargurunathan M. Category set to ext Keywords set to ext lookup
---------------------------------------- Bug #11158: redefinition of built-in ‘settings’ class should give warning or error https://projects.puppetlabs.com/issues/11158 Author: Dustin Mitchell Status: Accepted Priority: Normal Assignee: Joshua Lifton Category: ext Target version: Affected Puppet version: Keywords: ext lookup Branch: <pre> [root@relabs-slave tmp]# cat site.pp $extlookup_datadir = "xyz" $extlookup_precedence = ["local-settings", "default-settings"] import "settings.pp" [root@relabs-slave tmp]# cat settings.pp class settings { $foo = extlookup("bar") } [root@relabs-slave tmp]# puppet apply --noop site.pp warning: Scope(Class[Settings]): Could not look up qualified variable '::extlookup_datadir'; class has not been evaluated warning: Scope(Class[Settings]): Could not look up qualified variable '::extlookup_precedence'; class has not been evaluated No match found for 'bar' in any data file during extlookup() at /root/tmp/settings.pp:2 on node relabs-slave.build.mtv1.mozilla.com </pre> The above follows, roughly, the description in http://docs.puppetlabs.com/references/2.6.8/function.html#extlookup -- but doesn't work. We have found that moving the settings class into a module and explicitly including it helps. This points to a problem of trying to evaluate the extlookup too early (at parse time?). -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
