/[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 1281 - (hide annotations) (download)
Tue Mar 8 11:54:36 2011 UTC (13 years, 1 month ago) by misc
File size: 3418 byte(s)
- use the new type for remote database declaration
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 1281 postgresql::remote_user { 'transifex':
13 misc 624 password => $pgsql_password,
14 misc 614 }
15    
16 misc 1281 postgresql::remote_database { 'transifex':
17 misc 614 description => "Transifex database",
18     user => "transifex",
19     }
20    
21 misc 191 file { "20-engines.conf":
22 dmorgan 177 path => "/etc/transifex/20-engines.conf",
23     ensure => present,
24     owner => root,
25 misc 340 group => apache,
26     mode => 640,
27 misc 455 content => template("transifex/20-engines.conf"),
28 misc 615 require => Package['transifex'],
29     notify => Service['apache']
30 dmorgan 177 }
31 misc 265
32 dmorgan 295 file { "30-site.conf":
33     path => "/etc/transifex/30-site.conf",
34     ensure => present,
35     owner => root,
36     group => root,
37 misc 340 mode => 644,
38 misc 455 content => template("transifex/30-site.conf"),
39 misc 615 require => Package['transifex'],
40     notify => Service['apache']
41 dmorgan 295 }
42    
43 misc 617 file { "40-apps.conf":
44     path => "/etc/transifex/40-apps.conf",
45     ensure => present,
46     owner => root,
47     group => root,
48     mode => 644,
49     content => template("transifex/40-apps.conf"),
50     require => Package['transifex'],
51     notify => Service['apache']
52     }
53    
54 misc 618 file { "45-ldap.conf":
55     path => "/etc/transifex/45-ldap.conf",
56     ensure => present,
57     owner => root,
58     group => root,
59     mode => 644,
60     content => template("transifex/45-ldap.conf"),
61     require => Package['transifex'],
62     notify => Service['apache']
63     }
64    
65 misc 629 file { "50-project.conf":
66     path => "/etc/transifex/50-project.conf",
67 misc 627 ensure => present,
68     owner => root,
69     group => root,
70     mode => 644,
71 misc 629 content => template("transifex/50-project.conf"),
72 misc 627 require => Package['transifex'],
73     notify => Service['apache']
74     }
75    
76 misc 630 subversion::snapshot { $templates_dir:
77 misc 628 source => "svn://svn.mageia.org/svn/web/templates/transifex/trunk"
78     }
79    
80 misc 616 apache::vhost_django_app { "transifex.$domain":
81     module => "transifex",
82 misc 622 use_ssl => true,
83 misc 1194 module_path => ["/usr/share/transifex","/usr/share","/usr/local/lib/"],
84     aliases => { "/site_media/static/admin/" => "/usr/lib/python2.6/site-packages/django/contrib/admin/media/", },
85 misc 622 }
86    
87     apache::vhost_redirect_ssl { "transifex.$domain": }
88 misc 1197
89 misc 1209 # the group are mapped from ldap, since AUTH_LDAP_FIND_GROUP_PERMS is set to yes
90     # but the group need to exist in django first
91 misc 1197 django_application::create_group { ["mga-i18n","mga-i18n-committers"]:
92     module => "transifex",
93     path => "/usr/share/transifex:/usr/share",
94     }
95    
96 misc 1214 define committers_permission($app='')
97     {
98 misc 1215 # using django_application::add_permission_to_group may cause problem
99     # if we install a 2nd django application with the same permission name ( as it need
100     # to be unique )
101 misc 1214 django_application::add_permission_to_group { $name:
102     app => $app,
103     group => 'mga-i18n-committers',
104     module => "transifex",
105     path => "/usr/share/transifex:/usr/share",
106     require => Django_application::Create_group['mga-i18n-committers'],
107     }
108 misc 1198 }
109 misc 1214
110     committers_permission { ['add_project',
111     'change_project',
112     'delete_project']: }
113    
114     committers_permission { [ 'add_resource',
115     'change_resource',
116     'delete_resource']:
117     app => "resources",
118     }
119 dmorgan 177 }

  ViewVC Help
Powered by ViewVC 1.1.30