/[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 1356 - (hide annotations) (download)
Tue Mar 22 17:43:44 2011 UTC (13 years, 1 month ago) by misc
File size: 3346 byte(s)
use the new type for user and database declaration ( will be used later for pg access list )
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     apache::vhost_redirect_ssl { "transifex.$domain": }
84 misc 1197
85 misc 1209 # the group are mapped from ldap, since AUTH_LDAP_FIND_GROUP_PERMS is set to yes
86     # but the group need to exist in django first
87 misc 1197 django_application::create_group { ["mga-i18n","mga-i18n-committers"]:
88     module => "transifex",
89     path => "/usr/share/transifex:/usr/share",
90     }
91    
92 misc 1214 define committers_permission($app='')
93     {
94 misc 1215 # using django_application::add_permission_to_group may cause problem
95     # if we install a 2nd django application with the same permission name ( as it need
96     # to be unique )
97 misc 1214 django_application::add_permission_to_group { $name:
98     app => $app,
99     group => 'mga-i18n-committers',
100     module => "transifex",
101     path => "/usr/share/transifex:/usr/share",
102     require => Django_application::Create_group['mga-i18n-committers'],
103     }
104 misc 1198 }
105 misc 1214
106     committers_permission { ['add_project',
107     'change_project',
108     'delete_project']: }
109    
110     committers_permission { [ 'add_resource',
111     'change_resource',
112     'delete_resource']:
113     app => "resources",
114     }
115 dmorgan 177 }

  ViewVC Help
Powered by ViewVC 1.1.30