Mercurial > repos > other > Puppet
annotate modules/apache/manifests/mod/autoindex.pp @ 437:b8d6ada284dd
Update Apache module to latest version
Also converted some params to ints to match
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 14 Aug 2022 11:30:13 +0100 |
parents | d9352a684e62 |
children | adf6fe9bbc17 |
rev | line source |
---|---|
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
1 # @summary |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
2 # Installs `mod_autoindex` |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
3 # |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
4 # @param icons_prefix |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
5 # Change the alias for /icons/. |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
6 # |
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
7 # @see https://httpd.apache.org/docs/current/mod/mod_autoindex.html for additional documentation. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
8 # |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
9 class apache::mod::autoindex ( |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
10 String $icons_prefix = $apache::params::icons_prefix |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
11 ) inherits apache::params { |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
12 include apache |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 ::apache::mod { 'autoindex': } |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
14 |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
15 # Determine icon filename suffix for autoindex.conf.erb |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
16 case $facts['os']['name'] { |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
17 'Debian', 'Ubuntu': { |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
18 $icon_suffix = '-20x22' |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
19 } |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
20 default: { |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
21 $icon_suffix = '' |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
22 } |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
23 } |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
24 |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 file { 'autoindex.conf': |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 ensure => file, |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
27 path => "${apache::mod_dir}/autoindex.conf", |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
28 mode => $apache::file_mode, |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 content => template('apache/mod/autoindex.conf.erb'), |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
30 require => Exec["mkdir ${apache::mod_dir}"], |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
31 before => File[$apache::mod_dir], |
36
37675581a273
Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
0
diff
changeset
|
32 notify => Class['apache::service'], |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 } |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 } |