The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #4360

a way for generators to find the current directory

Added by Alan Barrett over 3 years ago. Updated about 2 years ago.

Status:AcceptedStart date:07/26/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:functions
Target version:-
Affected Puppet version:0.25.5 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

I’d like generators to be able to make decisions based on the existence of files in the module’s “templates” or “files” directories. For example, a generator could choose whether a file resource used content => template(“mymodule/somefile”) or content => template(“mymodule/somefile.$fqdn”).

It would be sufficient if puppet did a chdir to the module directory before running the generator, or if puppet provided an environment variable to inform the generator of the appropriate directory name.

History

#1 Updated by James Turnbull over 3 years ago

  • Category set to functions
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies

#2 Updated by Luke Kanies over 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Luke Kanies)

Seems like a good idea.

Also available in: Atom PDF