summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/passenger.pp
blob: 06e2a2b711919f9d6d30a3436975f6457cf6599f (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
# class to use passenger for serving puppetmaster

class puppet::puppetmaster::passenger {
   
    case $operatingsystem {
        debian:    { include puppet::puppetmaster::passenger::debian  }
        defaults: { notice ( "class puppet::puppetmaster::passenger::base needs to be configured for using passenger with non-debian OS !" )
		    include  puppet::puppetmaster::passenger::base }    	
	}
}

class puppet::puppetmaster::passenger::debian inherits puppet::puppetmaster::passenger::base {
    # according to http://github.com/reductivelabs/puppet/tree/master/ext/rack rack needs 
    # to be version >= 1.0.0 . lenny-backports provide it
    package { "librack-ruby": ensure => "1.0.0-2~bpo50+1" } 
    package { "librack-ruby1.8": ensure => "1.0.0-2~bpo50+1" } 
    
    apache::config::global{ 'puppet-apache2-passenger.conf': }
    apache::debian::module { 'ssl': ensure    => present }
    apache::debian::module { 'passenger': ensure    => present }
    apache::debian::module { 'headers': ensure    => present }
}

class puppet::puppetmaster::passenger::base {

    include apache
    include passenger::apache
    

    # http://github.com/reductivelabs/puppet/tree/master/ext/rack
    file { ["/etc/puppet/rack", "/etc/puppet/rack/public"]:
      ensure => directory,
      mode => 0755,
      owner => root,
      group => root,
    }
    file { "/etc/puppet/rack/config.ru":
      ensure => present,
      source => "puppet:///modules/puppet/master/config.ru",
      mode => 0644,
      owner => puppet,
      group => root,
    }
}