]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/manifests/mod/auth_cas.pp
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / mod / auth_cas.pp
1 class apache::mod::auth_cas (
2   $cas_login_url,
3   $cas_validate_url,
4   $cas_cookie_path          = $::apache::params::cas_cookie_path,
5   $cas_version              = 2,
6   $cas_debug                = 'Off',
7   $cas_validate_depth       = undef,
8   $cas_certificate_path     = undef,
9   $cas_proxy_validate_url   = undef,
10   $cas_root_proxied_as      = undef,
11   $cas_cookie_entropy       = undef,
12   $cas_timeout              = undef,
13   $cas_idle_timeout         = undef,
14   $cas_cache_clean_interval = undef,
15   $cas_cookie_domain        = undef,
16   $cas_cookie_http_only     = undef,
17   $cas_authoritative        = undef,
18   $suppress_warning         = false,
19 ) {
20
21   validate_string($cas_login_url, $cas_validate_url, $cas_cookie_path)
22
23   if $::osfamily == 'RedHat' and ! $suppress_warning {
24     warning('RedHat distributions do not have Apache mod_auth_cas in their default package repositories.')
25   }
26
27   ::apache::mod { 'auth_cas': }
28
29   file { $cas_cookie_path:
30     ensure => directory,
31     before => File['auth_cas.conf'],
32     mode   => '0750',
33     owner  => $apache::user,
34     group  => $apache::group,
35   }
36
37   # Template uses
38   # - All variables beginning with cas_
39   file { 'auth_cas.conf':
40     ensure  => file,
41     path    => "${::apache::mod_dir}/auth_cas.conf",
42     content => template('apache/mod/auth_cas.conf.erb'),
43     require => [ Exec["mkdir ${::apache::mod_dir}"], ],
44     before  => File[$::apache::mod_dir],
45     notify  => Class['Apache::Service'],
46   }
47
48 }