summaryrefslogtreecommitdiff
path: root/manifests/ssl.pp
blob: 53848e94b84ffc537e9e9caa22b91425855596f7 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
# manifests/ssl.pp

class apache::ssl inherits apache {
    case $operatingsystem {
        centos: { include apache::ssl::centos }
        gentoo: { include apache::ssl::gentoo }
        openbsd: { include apache::ssl::openbsd }
        defaults: { include apache::ssl::base }
    }
}

class apache::ssl::base {
    apache::config::file{ 'ssl_defaults.inc': }
    apache::vhost::file{ '0-default_ssl': }
}


### distribution specific classes

### centos
class apache::ssl::centos inherits apache::ssl::base {
    package { 'mod_ssl':
        name => 'mod_ssl',
        ensure => present,
        require => Package[apache],
    }
    apache::config::file{ 'ssl.conf': }
}

### gentoo
class apache::ssl::gentoo inherits apache::ssl::base {}

class apache::ssl::openbsd inherits apache::openbsd {
    include apache::ssl::base

    Line['enable_apache_on_boot']{
        ensure => 'absent',
    }
    line{'enable_apachessl_on_boot':
        file => '/etc/rc.conf.local',
        line => 'httpd flags="-DSSL"',
    }

    File['/opt/bin/restart_apache.sh']{
        source => "puppet://$server/apache/OpenBSD/bin/restart_apache_ssl.sh",
    }
    Service['apache']{
        start => 'apachectl startssl',
    }
}