File: reqtimeout.pp

package info (click to toggle)
puppet-module-puppetlabs-apache 12.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,664 kB
  • sloc: ruby: 275; sh: 32; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 814 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# @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 (
  Variant[Array[String], String] $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 => epp('apache/mod/reqtimeout.conf.epp', { 'timeouts'  => $timeouts, }),
    require => Exec["mkdir ${apache::mod_dir}"],
    before  => File[$apache::mod_dir],
    notify  => Class['apache::service'],
  }
}