File: cgi.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 (28 lines) | stat: -rw-r--r-- 738 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
# @summary
#   Installs `mod_cgi`.
# 
# @see https://httpd.apache.org/docs/current/mod/mod_cgi.html for additional documentation.
#
class apache::mod::cgi {
  include apache
  case $facts['os']['family'] {
    'FreeBSD': {}
    default: {
      if defined(Class['apache::mod::itk']) {
        Class['apache::mod::itk'] -> Class['apache::mod::cgi']
      } elsif defined(Class['apache::mod::peruser']) {
        Class['apache::mod::peruser'] -> Class['apache::mod::cgi']
      } else {
        Class['apache::mod::prefork'] -> Class['apache::mod::cgi']
      }
    }
  }

  if $facts['os']['family'] == 'Suse' {
    ::apache::mod { 'cgi':
      lib_path => '/usr/lib64/apache2-prefork',
    }
  } else {
    ::apache::mod { 'cgi': }
  }
}