Puppet Class: profile::misc_apps::httpd

Defined in:
modules/profile/manifests/misc_apps/httpd.pp

Overview

setup a webserver for misc. apps

Parameters:

  • deployment_server (Any) (defaults to: hiera('deployment_server'))


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
28
29
# File 'modules/profile/manifests/misc_apps/httpd.pp', line 2

class profile::misc_apps::httpd (
    $deployment_server = hiera('deployment_server'),
){

    $apache_modules_common = ['rewrite', 'headers', 'proxy', 'proxy_http']
    $apache_php_module = 'php7.3'
    $apache_modules = concat($apache_modules_common, $apache_php_module)

    require_package('libapache2-mod-php')

    class { '::httpd':
        modules => $apache_modules,
    }

    base::service_auto_restart { 'apache2': }

    ferm::service { 'miscweb-http-envoy':
        proto  => 'tcp',
        port   => '80',
        srange => "(${::ipaddress} ${::ipaddress6})"
    }

    ferm::service { 'miscweb-http-deployment':
        proto  => 'tcp',
        port   => '80',
        srange => "(@resolve((${deployment_server})) @resolve((${deployment_server}), AAAA))"
    }
}