File: watchdog.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 (31 lines) | stat: -rw-r--r-- 843 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
25
26
27
28
29
30
31
# @summary
#   Installs and configures `mod_watchdog`.
#
# @param watchdog_interval
#   Sets the interval at which the watchdog_step hook runs.
#
# @see https://httpd.apache.org/docs/current/mod/mod_watchdog.html for additional documentation.
class apache::mod::watchdog (
  Optional[Integer] $watchdog_interval = undef,
) {
  include apache

  $module_builtin = $facts['os']['family'] in ['Debian']

  unless $module_builtin {
    apache::mod { 'watchdog':
    }
  }

  if $watchdog_interval {
    file { 'watchdog.conf':
      ensure  => file,
      path    => "${apache::mod_dir}/watchdog.conf",
      mode    => $apache::file_mode,
      content => "WatchdogInterval ${watchdog_interval}\n",
      require => Exec["mkdir ${apache::mod_dir}"],
      before  => File[$apache::mod_dir],
      notify  => Class['apache::service'],
    }
  }
}