Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define custom templates with foreman's --template option?

While using the foreman gem I'm having some issues where it will not allow me to define a custom template.

For one of my apps I am able to define ~/.foreman/templates/upstart/master.conf.erb and it is read just fine. Yet for another project, no matter what I try, I cannot get a template to evoke properly with forman upstart exportation.

I've attempted many different ways from defining the -t and --template flag with a file with absolute and relative paths to the ~/.foreman approach. Nothing seems to work.

Could you please offer a few demonstrations / scenarios of how the -t flag should be defined with a template in the version controlled directory (such as in config/upstart-master.conf.erb)?

like image 903
ylluminate Avatar asked Oct 07 '22 00:10

ylluminate


1 Answers

The argument given to -t (or --template) must be a directory containing 0, 1, 2 or all 3 of:

master.conf.erb
process_master.conf.erb
process.conf.erb

And not a file itself.

Initial feature pull request. Pull request to improve docs as the current docs only state: "Specify an alternate template to use for creating export files."

like image 53
AJP Avatar answered Oct 13 '22 12:10

AJP