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

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

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

revision 1195 by misc, Wed Feb 23 16:47:14 2011 UTC revision 1196 by misc, Thu Feb 24 18:52:53 2011 UTC
# Line 15  class django_application { Line 15  class django_application {
15          source => "puppet:///modules/django_application/custom_backend.py",          source => "puppet:///modules/django_application/custom_backend.py",
16          notify => Service['apache']          notify => Service['apache']
17      }      }
18    
19        define script() {
20            file { $name:
21                path => "/usr/local/bin/$name",
22                ensure => present,
23                owner => root,
24                group => root,
25                mode => 755,
26                source => "puppet:///modules/django_application/$name",
27            }
28        }
29    
30        script { ['django_create_group.py','django_add_permission_to_group.py']:
31        }
32    
33        define create_group($path,$module) {
34            exec { "/usr/local/bin/django_create_group.py $name":
35                user => root,
36                environment => ["DJANGO_SETTINGS_MODULE=$module.settings",
37                                "PYTHONPATH=$path" ],
38                require => Django_application::Script['django_create_group.py']
39            }
40        }
41    
42        define add_permission_to_group($path,$module,$group) {
43            exec { "/usr/local/bin/django_add_permission_to_group.py $group $name":
44                user => root,
45                environment => ["DJANGO_SETTINGS_MODULE=$module.settings",
46                                "PYTHONPATH=$path" ],
47                require => Django_application::Script['django_add_permission_to_group.py']
48            }
49        }
50  }  }

Legend:
Removed from v.1195  
changed lines
  Added in v.1196

  ViewVC Help
Powered by ViewVC 1.1.28