Mercurial > repos > other > Puppet
view modules/website/manifests/http.pp @ 263:f99974dc0f1a
Add a way to skip setting CSP
NextCloud manages CSP itself, so we don't need the header in the
PIM subdomain causing confusion and incorrect results
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 29 Dec 2019 16:43:55 +0000 |
parents | 1df1e161bbb5 |
children | 13825cc1ec57 |
line wrap: on
line source
define website::http( $docroot = undef, $docroot_owner = 'root', $docroot_group = 'root', $serveraliases = [], $ensure = 'present', $custom_fragment = undef ) { validate_re($ensure, '^(present|absent)$', "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") if ! defined(Class['website']) { fail('You must include the website base class before using any website defined resources') } validate_re($ensure, '^(present|absent)$', "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") $shortname = domain_to_short_name($name) $logpart = $shortname if $docroot == undef { $siteroot = "${website::basedir}/${shortname}" } else { $siteroot = $docroot } apache::vhost { $name: port => '80', docroot => $siteroot, docroot_owner => $docroot_owner, docroot_group => $docroot_group, docroot_mode => '2775', custom_fragment => $custom_fragment, logroot => '/var/log/apache/', access_log_file => "access_${logpart}.log", access_log_format => "%h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\" %{Host}i", serveraliases => $serveraliases, ensure => $ensure, } }