Bug #2752

require function does not work in 'puppet'

Added by R.I. Pienaar over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:10/26/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:0.25.1
Affected Puppet version:0.25.1rc2 Branch:luke/tickets/0.25.x/2752
Keywords:
Votes: 0

Description

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:

undefined method `function_include' for # at /home/rip/test.pp:6 on node nephilim.ml.org

Failing Manifest:

class foo { notice("foo") }
require foo

Working Manifest:

class foo { notice("foo") }
class bar { notice("bar") }
include bar
require foo

The fix is to just add:

Puppet::Parser::Functions.function(:include)

into the require.rb

History

Updated by James Turnbull over 2 years ago

  • Status changed from Unreviewed to Accepted
  • Target version set to 0.25.1

Updated by James Turnbull over 2 years ago

  • Status changed from Accepted to Closed
  • Branch set to luke/tickets/0.25.x/2752

Pushed in commit:09fb3f707dfce31a11eda2f35bd77e65c911c15f in branch 0.25.x

Also available in: Atom PDF