2016-10-17 04:05:49 +02:00
|
|
|
class zulip_ops::apache {
|
2013-11-08 21:18:03 +01:00
|
|
|
$apache_packages = [# Needed to run Apache with WSGI
|
2018-08-13 21:29:40 +02:00
|
|
|
'apache2',
|
|
|
|
'libapache2-mod-wsgi',
|
2013-11-08 21:18:03 +01:00
|
|
|
]
|
2018-08-13 21:29:40 +02:00
|
|
|
package { $apache_packages: ensure => 'installed' }
|
2013-02-07 22:20:10 +01:00
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
apache2mod { [ 'headers', 'proxy', 'proxy_http', 'rewrite', 'auth_digest', 'ssl' ]:
|
2013-02-08 18:46:43 +01:00
|
|
|
ensure => present,
|
|
|
|
require => Package['apache2'],
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/users/':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package['apache2'],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'www-data',
|
|
|
|
group => 'www-data',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0600',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2020-05-29 00:00:30 +02:00
|
|
|
file { '/etc/apache2/users/monitoring':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-08-13 21:29:40 +02:00
|
|
|
require => File['/etc/apache2/users/'],
|
|
|
|
owner => 'www-data',
|
|
|
|
group => 'www-data',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0600',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/apache/users',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/certs/':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package['apache2'],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0644',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/ports.conf':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => file,
|
2018-04-23 08:41:28 +02:00
|
|
|
require => Package[apache2],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0640',
|
2018-08-13 21:29:40 +02:00
|
|
|
source => 'puppet:///modules/zulip_ops/apache/ports.conf',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
|
2018-08-13 21:29:40 +02:00
|
|
|
file { '/etc/apache2/sites-available/':
|
2018-08-13 21:20:34 +02:00
|
|
|
ensure => directory,
|
2013-02-07 22:20:10 +01:00
|
|
|
require => Package[apache2],
|
2018-08-13 21:29:40 +02:00
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
2018-08-13 21:20:34 +02:00
|
|
|
mode => '0640',
|
2013-02-07 22:20:10 +01:00
|
|
|
}
|
|
|
|
}
|