summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/manifests/domain.pp
blob: 8af2230fe8ae7c67f4813770c5e11efb1ee978e3 (plain)
1
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
define site_static::domain (
  $locations,
  $ca_cert,
  $key,
  $cert,
  $tls_only) {

  $domain = $name
  $base_dir = '/srv/static'

  create_resources(site_static::location, $locations)

  x509::cert { $domain: content => $cert }
  x509::key  { $domain: content => $key }
  x509::ca   { "${domain}_ca": content => $ca_cert }

  class { '::apache': no_default_site => true, ssl => true }
  include site_apache::module::headers
  include site_apache::module::alias
  include site_apache::module::expires
  include site_apache::module::removeip
  include site_apache::module::rewrite

  apache::vhost::file { $domain:
    content => template('site_static/apache.conf.erb')
  }

}