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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2223 - (hide annotations) (download)
Sun Jan 8 22:24:53 2012 UTC (12 years, 1 month ago) by misc
File size: 1497 byte(s)
cleaning of the django_application module
1 misc 1183 # this class hold the common stuff for all django applications
2     # as we cannot declare the same ressource twice ( ie, python-psycopg2 for example )
3     # it is required to place this in a common class
4 misc 1141 class django_application {
5 misc 2223 package { ['python-django','python-psycopg2','python-django-auth-ldap']: }
6 misc 1141
7 misc 2223 file { "/usr/local/lib/custom_backend.py":
8 misc 1141 source => "puppet:///modules/django_application/custom_backend.py",
9     notify => Service['apache']
10     }
11 misc 1196
12     define script() {
13     file { $name:
14     path => "/usr/local/bin/$name",
15     mode => 755,
16     source => "puppet:///modules/django_application/$name",
17     }
18     }
19    
20 misc 2223 script { ['django_create_group.py','django_add_permission_to_group.py']: }
21 misc 1196
22     define create_group($path,$module) {
23     exec { "/usr/local/bin/django_create_group.py $name":
24     user => root,
25     environment => ["DJANGO_SETTINGS_MODULE=$module.settings",
26     "PYTHONPATH=$path" ],
27     require => Django_application::Script['django_create_group.py']
28     }
29     }
30    
31 misc 1212 define add_permission_to_group($path,$module,$group, $app='') {
32     exec { "/usr/local/bin/django_add_permission_to_group.py $group $name $app":
33 misc 1196 user => root,
34     environment => ["DJANGO_SETTINGS_MODULE=$module.settings",
35     "PYTHONPATH=$path" ],
36     require => Django_application::Script['django_add_permission_to_group.py']
37     }
38     }
39 misc 1141 }

  ViewVC Help
Powered by ViewVC 1.1.30