aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache/manifests
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-06 17:50:14 +0000
committerMichael Scherer <misc@mageia.org>2010-11-06 17:50:14 +0000
commit8751ab870047dadcbc48a5e21708274e2600399e (patch)
tree4cedeac7a6035dfe5a555af14dab796c88f9fb1e /modules/apache/manifests
parenta4e64977303b0318a83e30569271c91bf27b7fd7 (diff)
downloadpuppet-8751ab870047dadcbc48a5e21708274e2600399e.tar
puppet-8751ab870047dadcbc48a5e21708274e2600399e.tar.gz
puppet-8751ab870047dadcbc48a5e21708274e2600399e.tar.bz2
puppet-8751ab870047dadcbc48a5e21708274e2600399e.tar.xz
puppet-8751ab870047dadcbc48a5e21708274e2600399e.zip
- add django support with wsgi
Diffstat (limited to 'modules/apache/manifests')
-rw-r--r--modules/apache/manifests/init.pp33
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index 6b8f7bef..83f89088 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -1,6 +1,7 @@
class apache {
$vhost_dir = "/etc/httpd/conf/vhosts.d"
+ $wsgi_dir = "/usr/local/lib/wsgi"
class base {
package { "apache-mpm-prefork":
@@ -54,6 +55,13 @@ class apache {
package { "apache-mod_wsgi":
ensure => installed
}
+
+ file { $wsgi_dir:
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => 644,
+ }
}
define vhost_redirect_ssl() {
@@ -82,4 +90,29 @@ class apache {
content => template("apache/vhost_catalyst_app.conf")
}
}
+
+ define vhost_django_app($module, $module_path = '/usr/share') {
+ include apache::mod_wsgi
+
+ file { "$name.conf":
+ path => "$vhost_dir/$name.conf",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Service['apache'],
+ content => template("apache/vhost_django_app.conf")
+ }
+
+ # fichier django wsgi
+ file { "$name.wsgi":
+ path => "$wsgi_dir/$name.wsgi",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 755,
+ notify => Service['apache'],
+ content => template("apache/django.wsgi")
+ }
+ }
}