Ask Your Question
1

How can I customize a standard template?

asked 2013-11-02 12:28:57 -0500

Wadim Grasza gravatar image

updated 2013-11-02 12:32:45 -0500

I want to extend the templates/vhost/_ssl.erb template from the puppetlabs/apache module by adding a few Apache directives that are not supported by the original template. To do this I suppose I need to:

  1. Customize the template file itself.
  2. Add custom variables to the class.

How can I do this?

Can I copy the template file to another location and customize it there or do I have to edit it in place?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-11-04 06:48:13 -0500

golja gravatar image

Sure I mean the module is open source so you can do whatever modification you want.

Maybe I would recommend to actually fork the module from GitHub make your modification and commit a Pull Request. If the change is helpful to other users they will probably integrate it to the main branch, however even if not it will be easier for you to keep updated with bugfixes and new features.

edit flag offensive delete link more

Comments

I was honestly hoping for a more inheritance-like approach where my local modifications would extend the class without contaminating the original logic. If I follow your approach I will be ...(more)

Wadim Grasza gravatar imageWadim Grasza ( 2013-11-12 03:02:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-11-02 12:28:57 -0500

Seen: 74 times

Last updated: Nov 04 '13