Issue #2752 has been updated by James Turnbull.

Status changed from Unreviewed to Accepted
Target version set to 0.25.1


----------------------------------------
Bug #2752: require function does not work in 'puppet'
http://projects.reductivelabs.com/issues/2752

Author: R.I. Pienaar aka Volcane
Status: Accepted
Priority: Normal
Assigned to: 
Category: 
Target version: 0.25.1
Affected version: 0.25.1rc2
Keywords: 
Branch: 


hello,

When you attempt to use 'require' in a manifest run by 'puppet' it doesn't 
always work, functions are loaded on demand so if you have an include earlier 
on and then the require it works, else you're told:

<pre>
undefined method `function_include' for #<Puppet::Parser::Scope:0xb7a9ecac> at 
/home/rip/test.pp:6 on node nephilim.ml.org
</pre>

Failing Manifest:
<pre>
class foo { notice("foo") }
require foo
</pre>

Working Manifest:
<pre>
class foo { notice("foo") }
class bar { notice("bar") }
include bar
require foo
</pre>
 

The fix is to just add:

<pre>
Puppet::Parser::Functions.function(:include)
</pre>

into the require.rb 


-- 
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to