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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 181 by misc, Sat Nov 6 17:39:16 2010 UTC revision 182 by misc, Sat Nov 6 17:50:14 2010 UTC
# Line 1  Line 1 
1  class apache {  class apache {
2    
3      $vhost_dir = "/etc/httpd/conf/vhosts.d"      $vhost_dir = "/etc/httpd/conf/vhosts.d"
4        $wsgi_dir = "/usr/local/lib/wsgi"
5    
6      class base {      class base {
7          package { "apache-mpm-prefork":          package { "apache-mpm-prefork":
# Line 54  class apache { Line 55  class apache {
55          package { "apache-mod_wsgi":          package { "apache-mod_wsgi":
56              ensure => installed              ensure => installed
57          }          }
58    
59            file { $wsgi_dir:
60                ensure => directory,
61                owner => root,
62                group => root,
63                mode => 644,
64            }
65      }      }
66    
67      define vhost_redirect_ssl() {      define vhost_redirect_ssl() {
# Line 82  class apache { Line 90  class apache {
90              content => template("apache/vhost_catalyst_app.conf")              content => template("apache/vhost_catalyst_app.conf")
91          }          }
92      }      }
93    
94        define vhost_django_app($module, $module_path = '/usr/share') {
95            include apache::mod_wsgi
96    
97            file { "$name.conf":
98                path => "$vhost_dir/$name.conf",
99                ensure => "present",
100                owner => root,
101                group => root,
102                mode => 644,
103                notify => Service['apache'],
104                content => template("apache/vhost_django_app.conf")
105            }
106    
107            # fichier django wsgi
108            file { "$name.wsgi":
109                path => "$wsgi_dir/$name.wsgi",
110                ensure => "present",
111                owner => root,
112                group => root,
113                mode => 755,
114                notify => Service['apache'],
115                content => template("apache/django.wsgi")
116            }
117        }
118  }  }

Legend:
Removed from v.181  
changed lines
  Added in v.182

  ViewVC Help
Powered by ViewVC 1.1.30