view modules/apache/manifests/peruser/multiplexer.pp @ 478:adf6fe9bbc17

Update Puppet modules to latest versions
author IBBoard <dev@ibboard.co.uk>
date Thu, 29 Aug 2024 18:47:29 +0100
parents b8d6ada284dd
children
line wrap: on
line source

# @summary
#   Checks if an Apache module has a class.
#
# If Apache has a class, it includes that class. If it does not, it passes the module name to the `apache::mod` defined type.
#
# @api private
define apache::peruser::multiplexer (
  String $user           = $apache::user,
  String $group          = $apache::group,
  Optional[String] $file = undef,
) {
  if ! $file {
    $filename = "${name}.conf"
  } else {
    $filename = $file
  }
  file { "${apache::mod_dir}/peruser/multiplexers/${filename}":
    ensure  => file,
    content => "Multiplexer ${user} ${group}\n",
    require => File["${apache::mod_dir}/peruser/multiplexers"],
    notify  => Class['apache::service'],
  }
}