view modules/apache/manifests/mod/reqtimeout.pp @ 275:d9352a684e62

Mass update of modules to remove deprecation warnings
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Jan 2020 11:36:07 +0000
parents 675c1cc61eaf
children b8d6ada284dd
line wrap: on
line source

# @summary
#   Installs and configures `mod_reqtimeout`.
# 
# @param timeouts
#   List of timeouts and data rates for receiving requests.
# 
# @see https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html for additional documentation.
#
class apache::mod::reqtimeout (
  $timeouts = ['header=20-40,minrate=500', 'body=10,minrate=500']
){
  include ::apache
  ::apache::mod { 'reqtimeout': }
  # Template uses no variables
  file { 'reqtimeout.conf':
    ensure  => file,
    path    => "${::apache::mod_dir}/reqtimeout.conf",
    mode    => $::apache::file_mode,
    content => template('apache/mod/reqtimeout.conf.erb'),
    require => Exec["mkdir ${::apache::mod_dir}"],
    before  => File[$::apache::mod_dir],
    notify  => Class['apache::service'],
  }
}