aboutsummaryrefslogtreecommitdiffstats
path: root/modules/epoll/manifests/init.pp
blob: 5a8c4da9fbbdb41366f966e7700e64332d4aa19e (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
class epoll {

    $vhost = "epoll.$domain"

    package { 'Epoll':
        ensure => installed
    }
    
    apache::vhost_catalyst_app { $vhost:
        script => "/usr/bin/epoll_fastcgi.pl", 
        use_ssl => true, 
        require => Package['Epoll']
    }

    openssl::self_signed_cert{ "$vhost":
        directory => "/etc/ssl/apache/"
    }

    apache::vhost_redirect_ssl { $vhost: }
     
    $password = extlookup("epoll_password",'x')

    @@postgresql::user { 'epoll':
        password => $password,
    }

 
    file { "epoll.yml": 
        path => "/etc/epoll.yml",    
        ensure => "present",
        owner => root,
        group => apache,
        mode => 640,
        content => template("epoll/epoll.yml")
    }

    @@postgresql::database { 'epoll':
        description => "Epoll database",
        user => "epoll",
        require => Postgresql::User['epoll']
    }

}