summaryrefslogtreecommitdiff
path: root/puppet/modules/apache/manifests/mozilla_autoconfig.pp
blob: f16e5ec776a8c9442a055192bbc66723dda55a11 (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
29
30
31
32
33
34
35
36
37
# setup autoconfig infos
#
# this will create a global autoconfig file, that maps
# any of your hosted domains on this host to a certain
# provider configuration. Which means, that you get a zero
# setup autoconfig for any domain that you host the website
# and the emails for.
# By default you only need to define the provider, which
# is usually your main domain. Everything else should be
# derived from that.
# You can however still fine tune things from it.
class apache::mozilla_autoconfig(
  $provider,
  $display_name      = undef,
  $shortname         = undef,
  $imap_server       = undef,
  $pop_server        = undef,
  $smtp_server       = undef,
  $documentation_url = undef,
) {
  apache::config::global { 'mozilla_autoconfig.conf': }

  file{
    '/var/www/autoconfig':
      ensure  => directory,
      require => Package['apache'],
      owner   => root,
      group   => apache,
      mode    => '0640';
  '/var/www/autoconfig/config.shtml':
      content => template('apache/webfiles/autoconfig/config.shtml.erb'),
      owner   => root,
      group   => apache,
      mode    => '0640',
      before  => Service['apache'],
  }
}