Puppet Class: apache::mod::autoindex

Inherits:
::apache::params
Defined in:
manifests/mod/autoindex.pp

Summary

Installs `mod_autoindex`

Overview

Parameters:

  • icons_prefix (Any) (defaults to: $apache::params::icons_prefix)

See Also:



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/mod/autoindex.pp', line 6

class apache::mod::autoindex (
  $icons_prefix   = $apache::params::icons_prefix
) inherits ::apache::params {
  include apache
  ::apache::mod { 'autoindex': }

  # Determine icon filename suffix for autoindex.conf.erb
  case $::operatingsystem {
    'Debian', 'Ubuntu': {
      $icon_suffix = '-20x22'
    }
    default: {
      $icon_suffix = ''
    }
  }

  file { 'autoindex.conf':
    ensure  => file,
    path    => "${apache::mod_dir}/autoindex.conf",
    mode    => $apache::file_mode,
    content => template('apache/mod/autoindex.conf.erb'),
    require => Exec["mkdir ${apache::mod_dir}"],
    before  => File[$apache::mod_dir],
    notify  => Class['apache::service'],
  }
}