summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/manifests/domain.pp
blob: 6941b1a33541aa10ac4f85bed61fa4e216a9c7bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
define site_static::domain (
  $ca_cert,
  $key,
  $cert,
  $tls_only=true,
  $locations=undef,
  $aliases=undef,
  $apache_config=undef) {

  $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 }

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

}