How to apply prefork configuration for Apache in Puppet

apache-2.2mpm-preforkpuppet

I'm using the puppetlabs apache module to manage my apache configuration.

I got everything configured, except the Server settings for mod_prefork. There is a template for prefork and it gets variable when initializing the class somehow, but I'm not exactly sure how.

I don't want to change the server settings in the template by hand, because I run apache on multiple hosts and don't want to change the value in the template itself.

Do you have any idea how to do that? The link to the module is here.

I had a read through the docs, but I'm unable to figure out how to do it.

Best Answer

You can set mpm_module to false, to explicitly declare the prefork-class with custom parameters afterwards.

class {
  'apache':
    mpm_module      => false,
}
class {
  'apache::mod::prefork':
    startservers    => "5",
    minspareservers => "3",
    maxspareservers => "3",
    serverlimit     => "64",
    maxclients      => "64",
}