]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/apache/manifests/mod/cgid.pp
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / mod / cgid.pp
diff --git a/3rdparty/modules/apache/manifests/mod/cgid.pp b/3rdparty/modules/apache/manifests/mod/cgid.pp
new file mode 100644 (file)
index 0000000..8946f65
--- /dev/null
@@ -0,0 +1,28 @@
+class apache::mod::cgid {
+  case $::osfamily {
+    'FreeBSD': {}
+    default: {
+      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'],
+    }
+  }
+}