view modules/apache/manifests/mod/mime_magic.pp @ 482:d83de9b3a62b default tip

Update hiera.yaml within Puppet config Forgot that we manage it from here. Now has content to match new packages
author IBBoard <dev@ibboard.co.uk>
date Fri, 30 Aug 2024 16:10:36 +0100
parents adf6fe9bbc17
children
line wrap: on
line source

# @summary
#   Installs and configures `mod_mime_magic`.
# 
# @param magic_file
#   Enable MIME-type determination based on file contents using the specified magic file.
# 
# @see https://httpd.apache.org/docs/current/mod/mod_mime_magic.html for additional documentation.
#
class apache::mod::mime_magic (
  Optional[String] $magic_file = undef,
) {
  include apache
  $_magic_file = pick($magic_file, "${apache::conf_dir}/magic")
  apache::mod { 'mime_magic': }
  # Template uses $magic_file
  file { 'mime_magic.conf':
    ensure  => file,
    path    => "${apache::mod_dir}/mime_magic.conf",
    mode    => $apache::file_mode,
    content => epp('apache/mod/mime_magic.conf.epp', { '_magic_file' => $_magic_file, }),
    require => Exec["mkdir ${apache::mod_dir}"],
    before  => File[$apache::mod_dir],
    notify  => Class['apache::service'],
  }
}