diff -r a2342f26c9de -r b0b56e0f8c7f dev/provisioning/modules/apache/manifests/mod/cgid.pp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev/provisioning/modules/apache/manifests/mod/cgid.pp Fri Jan 15 15:35:00 2016 +0100 @@ -0,0 +1,32 @@ +class apache::mod::cgid { + case $::osfamily { + 'FreeBSD': {} + default: { + if defined(Class['::apache::mod::event']) { + Class['::apache::mod::event'] -> Class['::apache::mod::cgid'] + } else { + Class['::apache::mod::worker'] -> Class['::apache::mod::cgid'] + } + } + } + + # Debian specifies it's cgid sock path, but RedHat uses the default value + # with no config file + $cgisock_path = $::osfamily ? { + 'debian' => "\${APACHE_RUN_DIR}/cgisock", + 'freebsd' => 'cgisock', + default => undef, + } + ::apache::mod { 'cgid': } + if $cgisock_path { + # Template uses $cgisock_path + file { 'cgid.conf': + ensure => file, + path => "${::apache::mod_dir}/cgid.conf", + content => template('apache/mod/cgid.conf.erb'), + require => Exec["mkdir ${::apache::mod_dir}"], + before => File[$::apache::mod_dir], + notify => Class['apache::service'], + } + } +}