mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
https://puppet.com/docs/puppet/7/style_guide.html#style_guide_module_design-quoting “If a string is a value from an enumerable set of options, such as present and absent, it SHOULD NOT be enclosed in quotes at all.” Signed-off-by: Anders Kaseorg <anders@zulip.com>
43 lines
1.1 KiB
Puppet
43 lines
1.1 KiB
Puppet
class zulip_ops::apache {
|
|
$apache_packages = [# Needed to run Apache with WSGI
|
|
'apache2',
|
|
'libapache2-mod-wsgi',
|
|
]
|
|
package { $apache_packages: ensure => installed }
|
|
service { 'apache2':
|
|
require => Package['apache2'],
|
|
}
|
|
|
|
apache2mod { [ 'headers', 'proxy', 'proxy_http', 'rewrite', 'auth_digest', 'ssl' ]:
|
|
ensure => present,
|
|
require => Package['apache2'],
|
|
notify => Service['apache2'],
|
|
}
|
|
|
|
file { '/etc/apache2/certs/':
|
|
ensure => directory,
|
|
require => Package['apache2'],
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
}
|
|
|
|
file { '/etc/apache2/ports.conf':
|
|
ensure => file,
|
|
require => Package[apache2],
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
source => 'puppet:///modules/zulip_ops/apache/ports.conf',
|
|
notify => Service['apache2'],
|
|
}
|
|
|
|
file { '/etc/apache2/sites-available/':
|
|
ensure => directory,
|
|
require => Package[apache2],
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
}
|
|
}
|