/[adm]/puppet/modules/apache/manifests/init.pp
ViewVC logotype

Annotation of /puppet/modules/apache/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 181 - (hide annotations) (download)
Sat Nov 6 17:39:16 2010 UTC (13 years, 5 months ago) by misc
File size: 2129 byte(s)
- refactor the directory name for apache vhost config
1 misc 80 class apache {
2    
3 misc 181 $vhost_dir = "/etc/httpd/conf/vhosts.d"
4    
5 misc 80 class base {
6     package { "apache-mpm-prefork":
7 misc 117 alias => apache,
8 misc 80 ensure => installed
9     }
10    
11 misc 96 service { httpd:
12     alias => apache,
13 misc 80 ensure => running,
14     subscribe => [ Package['apache-mpm-prefork'] ],
15     }
16 misc 117
17     file { "customization.conf":
18     ensure => present,
19 misc 126 path => "/etc/httpd/conf.d/customization.conf",
20 misc 117 content => template("apache/customization.conf"),
21     require => Package["apache"],
22     notify => Service["apache"],
23     owner => root,
24     group => root,
25     mode => 644,
26     }
27 misc 80 }
28    
29     class mod_php inherits base {
30     package { "apache-mod_php":
31     ensure => installed
32     }
33     }
34    
35     class mod_perl inherits base {
36     package { "apache-mod_perl":
37     ensure => installed
38     }
39     }
40    
41 misc 84 class mod_fcgid inherits base {
42     package { "apache-mod_fcgid":
43     ensure => installed
44     }
45     }
46    
47 misc 124 class mod_fastcgi inherits base {
48     package { "apache-mod_fastcgi":
49     ensure => installed
50     }
51     }
52 misc 84
53 misc 80 class mod_wsgi inherits base {
54     package { "apache-mod_wsgi":
55     ensure => installed
56     }
57     }
58 misc 167
59 misc 176 define vhost_redirect_ssl() {
60     file { "redirect_ssl_$name.conf":
61 misc 181 path => "$vhost_dir/redirect_ssl_$name.conf",
62 misc 176 ensure => "present",
63     owner => root,
64     group => root,
65     mode => 644,
66     notify => Service['apache'],
67     content => template("apache/vhost_ssl_redirect.conf")
68     }
69     }
70 misc 167
71 misc 176 define vhost_catalyst_app($script, $process = 4, $use_ssl = false) {
72    
73 misc 167 include apache::mod_fastcgi
74    
75     file { "$name.conf":
76 misc 181 path => "$vhost_dir/$name.conf",
77 misc 167 ensure => "present",
78     owner => root,
79     group => root,
80     mode => 644,
81     notify => Service['apache'],
82     content => template("apache/vhost_catalyst_app.conf")
83     }
84     }
85 misc 80 }

  ViewVC Help
Powered by ViewVC 1.1.30