summaryrefslogtreecommitdiff
path: root/manifests/mlmmj/web.pp
blob: 5373b8f658bf5c717c1a9c22d176d9d2cea5be6c (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
class mail::mlmmj::web inherits websites::setup {
  apache::site { "${mail::mlmmj::subdomain}":
    docroot     => "/usr/share/mlmmj-php-web-admin",
    owner       => 'mlmmj',
    group       => 'mlmmj',
    mpm_user    => 'mlmmj',
    mpm_group   => 'mlmmj',
    manage_user => false,
    require     => Package['mlmmj-php-web-admin'],
  }

  package { [ 'mlmmj-php-web', 'mlmmj-php-web-admin' ]:
    ensure => present,
  }

  file { '/etc/mlmmj-php-web-admin':
    ensure => directory,
    owner  => mlmmj,
    group  => mlmmj,
    mode   => '0640',
  }

  file { '/etc/mlmmj-php-web-admin/htpasswd':
    ensure  => present,
    owner   => mlmmj,
    group   => mlmmj,
    mode    => '0640',
    content => lookup('mail::mlmmj::web::htpasswd', undef, undef, ''),
  }
}