From 6c0bc81bed7043b88eb613f7218f447cd027585f Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 15 Dec 2010 01:39:27 +0000 Subject: do not use a variable called module in template, this is a reserved ruby keyword --- modules/apache/manifests/init.pp | 2 ++ modules/apache/templates/django.wsgi | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/apache') diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index 04ca16e1..a46a0974 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -119,6 +119,8 @@ class apache { define vhost_django_app($module, $module_path = '/usr/share') { include apache::mod_wsgi + # module is a ruby reserved keyword, cannot be used in templates + $django_module = $module file { "$name.conf": path => "/etc/httpd/conf/vhosts.d/$name.conf", ensure => "present", diff --git a/modules/apache/templates/django.wsgi b/modules/apache/templates/django.wsgi index 90521653..194e28d8 100644 --- a/modules/apache/templates/django.wsgi +++ b/modules/apache/templates/django.wsgi @@ -1,7 +1,7 @@ #!/usr/bin/python import os, sys sys.path.append('<%= module_path %>') -os.environ['DJANGO_SETTINGS_MODULE'] = '<%= module %>.settings' +os.environ['DJANGO_SETTINGS_MODULE'] = '<%= django_module %>.settings' import django.core.handlers.wsgi -- cgit v1.2.1