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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1573 - (hide annotations) (download)
Tue May 3 09:28:56 2011 UTC (12 years, 11 months ago) by misc
File size: 3701 byte(s)
- add permission to committers to add a release so we can have global stats

1 dmorgan 177 class transifex {
2 misc 1182 include django_application
3     package { 'transifex':
4 dmorgan 177 ensure => installed
5     }
6 dmorgan 240
7 misc 624 $pgsql_password = extlookup("transifex_pgsql",'x')
8 misc 618 $ldap_password = extlookup("transifex_ldap",'x')
9 misc 614
10 misc 628 $templates_dir = "/var/lib/transifex/templates"
11    
12 misc 1356 postgresql::remote_db_and_user { 'transifex':
13     description => "Transifex database",
14 misc 624 password => $pgsql_password,
15 misc 614 }
16    
17 misc 191 file { "20-engines.conf":
18 dmorgan 177 path => "/etc/transifex/20-engines.conf",
19     ensure => present,
20     owner => root,
21 misc 340 group => apache,
22     mode => 640,
23 misc 455 content => template("transifex/20-engines.conf"),
24 misc 615 require => Package['transifex'],
25     notify => Service['apache']
26 dmorgan 177 }
27 misc 265
28 dmorgan 295 file { "30-site.conf":
29     path => "/etc/transifex/30-site.conf",
30     ensure => present,
31     owner => root,
32     group => root,
33 misc 340 mode => 644,
34 misc 455 content => template("transifex/30-site.conf"),
35 misc 615 require => Package['transifex'],
36     notify => Service['apache']
37 dmorgan 295 }
38    
39 misc 617 file { "40-apps.conf":
40     path => "/etc/transifex/40-apps.conf",
41     ensure => present,
42     owner => root,
43     group => root,
44     mode => 644,
45     content => template("transifex/40-apps.conf"),
46     require => Package['transifex'],
47     notify => Service['apache']
48     }
49    
50 misc 618 file { "45-ldap.conf":
51     path => "/etc/transifex/45-ldap.conf",
52     ensure => present,
53     owner => root,
54     group => root,
55     mode => 644,
56     content => template("transifex/45-ldap.conf"),
57     require => Package['transifex'],
58     notify => Service['apache']
59     }
60    
61 misc 629 file { "50-project.conf":
62     path => "/etc/transifex/50-project.conf",
63 misc 627 ensure => present,
64     owner => root,
65     group => root,
66     mode => 644,
67 misc 629 content => template("transifex/50-project.conf"),
68 misc 627 require => Package['transifex'],
69     notify => Service['apache']
70     }
71    
72 misc 630 subversion::snapshot { $templates_dir:
73 misc 628 source => "svn://svn.mageia.org/svn/web/templates/transifex/trunk"
74     }
75    
76 misc 616 apache::vhost_django_app { "transifex.$domain":
77     module => "transifex",
78 misc 622 use_ssl => true,
79 misc 1194 module_path => ["/usr/share/transifex","/usr/share","/usr/local/lib/"],
80     aliases => { "/site_media/static/admin/" => "/usr/lib/python2.6/site-packages/django/contrib/admin/media/", },
81 misc 622 }
82    
83 misc 1383 # tx need write access there when running in apache
84     file { "/var/lib/transifex/scratchdir/storage_files":
85     ensure => directory,
86     owner => apache,
87     group => apache,
88     require => Package['transifex'],
89     }
90    
91 misc 622 apache::vhost_redirect_ssl { "transifex.$domain": }
92 misc 1197
93 misc 1209 # the group are mapped from ldap, since AUTH_LDAP_FIND_GROUP_PERMS is set to yes
94     # but the group need to exist in django first
95 misc 1197 django_application::create_group { ["mga-i18n","mga-i18n-committers"]:
96     module => "transifex",
97     path => "/usr/share/transifex:/usr/share",
98     }
99    
100 misc 1214 define committers_permission($app='')
101     {
102 misc 1215 # using django_application::add_permission_to_group may cause problem
103     # if we install a 2nd django application with the same permission name ( as it need
104     # to be unique )
105 misc 1214 django_application::add_permission_to_group { $name:
106     app => $app,
107     group => 'mga-i18n-committers',
108     module => "transifex",
109     path => "/usr/share/transifex:/usr/share",
110     require => Django_application::Create_group['mga-i18n-committers'],
111     }
112 misc 1198 }
113 misc 1214
114     committers_permission { ['add_project',
115     'change_project',
116     'delete_project']: }
117    
118 misc 1573 committers_permission { ['add_release',
119     'change_release',
120     'delete_release']: }
121    
122 misc 1214 committers_permission { [ 'add_resource',
123     'change_resource',
124     'delete_resource']:
125     app => "resources",
126     }
127 dmorgan 177 }

  ViewVC Help
Powered by ViewVC 1.1.30