/[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 2222 by misc, Fri Feb 25 18:25:52 2011 UTC revision 2223 by misc, Sun Jan 8 22:24:53 2012 UTC
# Line 2  Line 2 
2  # as we cannot declare the same ressource twice ( ie, python-psycopg2 for example )  # as we cannot declare the same ressource twice ( ie, python-psycopg2 for example )
3  # it is required to place this in a common class  # it is required to place this in a common class
4  class django_application {  class django_application {
5      package { ['python-django','python-psycopg2','python-django-auth-ldap']:      package { ['python-django','python-psycopg2','python-django-auth-ldap']: }
         ensure => installed  
     }  
6    
7      file { "custom_backend.py":      file { "/usr/local/lib/custom_backend.py":
         path => "/usr/local/lib/custom_backend.py",  
         ensure => present,  
         owner => root,  
         group => root,  
         mode => 644,  
8          source => "puppet:///modules/django_application/custom_backend.py",          source => "puppet:///modules/django_application/custom_backend.py",
9          notify => Service['apache']          notify => Service['apache']
10      }      }
# Line 19  class django_application { Line 12  class django_application {
12      define script() {      define script() {
13          file { $name:          file { $name:
14              path => "/usr/local/bin/$name",              path => "/usr/local/bin/$name",
             ensure => present,  
             owner => root,  
             group => root,  
15              mode => 755,              mode => 755,
16              source => "puppet:///modules/django_application/$name",              source => "puppet:///modules/django_application/$name",
17          }          }
18      }      }
19    
20      script { ['django_create_group.py','django_add_permission_to_group.py']:      script { ['django_create_group.py','django_add_permission_to_group.py']: }
     }  
21    
22      define create_group($path,$module) {      define create_group($path,$module) {
23          exec { "/usr/local/bin/django_create_group.py $name":          exec { "/usr/local/bin/django_create_group.py $name":

Legend:
Removed from v.2222  
changed lines
  Added in v.2223

  ViewVC Help
Powered by ViewVC 1.1.28