annotate modules/apache/manifests/mod/info.pp @ 257:675c1cc61eaf

Update Apache module to get CentOS 8 support Unfortunately it only fixes some bits. mod_wsgi still needs other approaches This also overrides the vhost modification to make them come last in the import order (after module loading)
author IBBoard <dev@ibboard.co.uk>
date Sun, 22 Dec 2019 14:43:29 -0500
parents 37675581a273
children d9352a684e62
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 class apache::mod::info (
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
2 $allow_from = ['127.0.0.1','::1'],
257
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
3 $apache_version = undef,
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
4 $restrict_access = true,
257
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
5 $info_path = '/server-info',
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 ){
257
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
7 include ::apache
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
8 $_apache_version = pick($apache_version, $apache::apache_version)
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
9
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
10 if $::osfamily == 'Suse' {
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
11 if defined(Class['::apache::mod::worker']){
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
12 $suse_path = '/usr/lib64/apache2-worker'
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
13 } else {
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
14 $suse_path = '/usr/lib64/apache2-prefork'
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
15 }
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
16 ::apache::mod { 'info':
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
17 lib_path => $suse_path,
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
18 }
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
19 } else {
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
20 ::apache::mod { 'info': }
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
21 }
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
22
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
23 # Template uses $allow_from, $_apache_version
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 file { 'info.conf':
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 ensure => file,
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 path => "${::apache::mod_dir}/info.conf",
257
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
27 mode => $::apache::file_mode,
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 content => template('apache/mod/info.conf.erb'),
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 require => Exec["mkdir ${::apache::mod_dir}"],
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 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
31 notify => Class['apache::service'],
0
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 }
956e484adc12 Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 }