]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/apache/manifests/mod/dir.pp
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / mod / dir.pp
1 # Note: this sets the global DirectoryIndex directive, it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration
2 # Parameters:
3 # - $indexes provides a string for the DirectoryIndex directive http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
4 class apache::mod::dir (
5   $dir     = 'public_html',
6   $indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
7 ) {
8   validate_array($indexes)
9   ::apache::mod { 'dir': }
10
11   # Template uses
12   # - $indexes
13   file { 'dir.conf':
14     ensure  => file,
15     path    => "${::apache::mod_dir}/dir.conf",
16     content => template('apache/mod/dir.conf.erb'),
17     require => Exec["mkdir ${::apache::mod_dir}"],
18     before  => File[$::apache::mod_dir],
19     notify  => Class['apache::service'],
20   }
21 }