Puppet Class: wikistats::web

Defined in:
modules/wikistats/manifests/web.pp

Overview

the apache setup for the wikistats site

Parameters:

  • wikistats_host (Stdlib::Fqdn)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/wikistats/manifests/web.pp', line 2

class wikistats::web (
    Stdlib::Fqdn $wikistats_host,
) {

    if os_version('debian == buster') {
        require_package('php7.3-xml')
        $apache_php_package = 'libapache2-mod-php7.3'
    } else {
        require_package('php7.0-xml')
        $apache_php_package = 'libapache2-mod-php7.0'
    }

    require_package($apache_php_package)

    httpd::site { $wikistats_host:
        content => template('wikistats/apache/wikistats.erb'),
        require => Package[$apache_php_package],
    }

    file { '/var/www/wikistats':
        ensure => directory,
        mode   => '0755',
        owner  => 'wikistatsuser',
        group  => 'www-data',
    }
}