/[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 201 - (hide annotations) (download)
Mon Nov 8 01:12:49 2010 UTC (13 years, 5 months ago) by misc
File size: 3162 byte(s)
- I refactored too much this doesn't work as intended for define 

1 misc 80 class apache {
2    
3     class base {
4     package { "apache-mpm-prefork":
5 misc 117 alias => apache,
6 misc 80 ensure => installed
7     }
8    
9 misc 96 service { httpd:
10     alias => apache,
11 misc 80 ensure => running,
12     subscribe => [ Package['apache-mpm-prefork'] ],
13     }
14 misc 117
15     file { "customization.conf":
16     ensure => present,
17 misc 126 path => "/etc/httpd/conf.d/customization.conf",
18 misc 117 content => template("apache/customization.conf"),
19     require => Package["apache"],
20     notify => Service["apache"],
21     owner => root,
22     group => root,
23     mode => 644,
24     }
25 misc 80 }
26    
27     class mod_php inherits base {
28     package { "apache-mod_php":
29     ensure => installed
30     }
31     }
32    
33     class mod_perl inherits base {
34     package { "apache-mod_perl":
35     ensure => installed
36     }
37     }
38    
39 misc 84 class mod_fcgid inherits base {
40     package { "apache-mod_fcgid":
41     ensure => installed
42     }
43     }
44    
45 misc 124 class mod_fastcgi inherits base {
46     package { "apache-mod_fastcgi":
47     ensure => installed
48     }
49     }
50 misc 84
51 misc 192 class mod_ssl inherits base {
52     package { "apache-mod_ssl":
53     ensure => installed
54     }
55     }
56    
57 misc 80 class mod_wsgi inherits base {
58     package { "apache-mod_wsgi":
59     ensure => installed
60     }
61 misc 182
62 misc 201 file { "/usr/local/lib/wsgi":
63 misc 182 ensure => directory,
64     owner => root,
65     group => root,
66     mode => 644,
67     }
68 misc 80 }
69 misc 167
70 misc 176 define vhost_redirect_ssl() {
71     file { "redirect_ssl_$name.conf":
72 misc 201 path => "/etc/httpd/conf/vhosts.d/redirect_ssl_$name.conf",
73 misc 176 ensure => "present",
74     owner => root,
75     group => root,
76     mode => 644,
77     notify => Service['apache'],
78     content => template("apache/vhost_ssl_redirect.conf")
79     }
80     }
81 misc 167
82 misc 194 define vhost_catalyst_app($script, $location = '', $process = 4, $use_ssl = false) {
83 misc 176
84 misc 167 include apache::mod_fastcgi
85    
86     file { "$name.conf":
87 misc 201 path => "/etc/httpd/conf/vhosts.d/$name.conf",
88 misc 167 ensure => "present",
89     owner => root,
90     group => root,
91     mode => 644,
92     notify => Service['apache'],
93     content => template("apache/vhost_catalyst_app.conf")
94     }
95     }
96 misc 182
97     define vhost_django_app($module, $module_path = '/usr/share') {
98     include apache::mod_wsgi
99    
100     file { "$name.conf":
101 misc 201 path => "/etc/httpd/conf/vhosts.d/$name.conf",
102 misc 182 ensure => "present",
103     owner => root,
104     group => root,
105     mode => 644,
106     notify => Service['apache'],
107     content => template("apache/vhost_django_app.conf")
108     }
109    
110     # fichier django wsgi
111     file { "$name.wsgi":
112 misc 201 path => "/usr/local/lib/wsgi/$name.wsgi",
113 misc 182 ensure => "present",
114     owner => root,
115     group => root,
116     mode => 755,
117     notify => Service['apache'],
118     content => template("apache/django.wsgi")
119     }
120     }
121 misc 80 }

  ViewVC Help
Powered by ViewVC 1.1.30