Ask Your Question
0

puppetlabs/apache includes as hiera resources

asked 2015-07-03 09:06:33 -0600

mat1010 gravatar image

updated 2015-07-04 14:57:51 -0600

Hi @ll -

right now we are using the official apache module from puppetlabs and hiera to create our vhost configurations. Every vhosts includes a set of config files which are file resources right now. We do that to avoid having the content of those config files to be defined in each vhost over and over again.

Is there a way to define the content of those include files in hiera and include the hiera data in each vhost with a single line?

Thanks in advnace, mat1010

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-09-02 05:17:49 -0600

SimonH gravatar image

If I'm understanding your question correctly and you're wanting to add predefined files to the definitions for a virtual host, I'd look at the additional_includes parameter within the virtual host type.

edit flag offensive delete link more
0

answered 2015-09-02 07:30:45 -0600

Hi,

As modifying a public module is not advised, I suggest you to create a wrapper module for your specific need.

This will let you use the puppetlabs/apache module by just add your personal configuration/data which is not standard for the community.

Just create a new module with a name such as apache_wrapper. In it, you will have a class which inherits from the puppetlabs/apache init.pp and you will add/override the détails you want.

Regards, Rudy

edit flag offensive delete link more

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: 2015-07-03 09:06:33 -0600

Seen: 261 times

Last updated: Sep 02 '15