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 |
614 |
@@postgresql::user { 'transifex': |
13 |
misc |
624 |
password => $pgsql_password, |
14 |
misc |
614 |
} |
15 |
|
|
|
16 |
|
|
@@postgresql::database { 'transifex': |
17 |
|
|
description => "Transifex database", |
18 |
|
|
user => "transifex", |
19 |
|
|
require => Postgresql::User['transifex'] |
20 |
|
|
} |
21 |
|
|
|
22 |
misc |
191 |
file { "20-engines.conf": |
23 |
dmorgan |
177 |
path => "/etc/transifex/20-engines.conf", |
24 |
|
|
ensure => present, |
25 |
|
|
owner => root, |
26 |
misc |
340 |
group => apache, |
27 |
|
|
mode => 640, |
28 |
misc |
455 |
content => template("transifex/20-engines.conf"), |
29 |
misc |
615 |
require => Package['transifex'], |
30 |
|
|
notify => Service['apache'] |
31 |
dmorgan |
177 |
} |
32 |
misc |
265 |
|
33 |
dmorgan |
295 |
file { "30-site.conf": |
34 |
|
|
path => "/etc/transifex/30-site.conf", |
35 |
|
|
ensure => present, |
36 |
|
|
owner => root, |
37 |
|
|
group => root, |
38 |
misc |
340 |
mode => 644, |
39 |
misc |
455 |
content => template("transifex/30-site.conf"), |
40 |
misc |
615 |
require => Package['transifex'], |
41 |
|
|
notify => Service['apache'] |
42 |
dmorgan |
295 |
} |
43 |
|
|
|
44 |
misc |
617 |
file { "40-apps.conf": |
45 |
|
|
path => "/etc/transifex/40-apps.conf", |
46 |
|
|
ensure => present, |
47 |
|
|
owner => root, |
48 |
|
|
group => root, |
49 |
|
|
mode => 644, |
50 |
|
|
content => template("transifex/40-apps.conf"), |
51 |
|
|
require => Package['transifex'], |
52 |
|
|
notify => Service['apache'] |
53 |
|
|
} |
54 |
|
|
|
55 |
misc |
618 |
file { "45-ldap.conf": |
56 |
|
|
path => "/etc/transifex/45-ldap.conf", |
57 |
|
|
ensure => present, |
58 |
|
|
owner => root, |
59 |
|
|
group => root, |
60 |
|
|
mode => 644, |
61 |
|
|
content => template("transifex/45-ldap.conf"), |
62 |
|
|
require => Package['transifex'], |
63 |
|
|
notify => Service['apache'] |
64 |
|
|
} |
65 |
|
|
|
66 |
misc |
629 |
file { "50-project.conf": |
67 |
|
|
path => "/etc/transifex/50-project.conf", |
68 |
misc |
627 |
ensure => present, |
69 |
|
|
owner => root, |
70 |
|
|
group => root, |
71 |
|
|
mode => 644, |
72 |
misc |
629 |
content => template("transifex/50-project.conf"), |
73 |
misc |
627 |
require => Package['transifex'], |
74 |
|
|
notify => Service['apache'] |
75 |
|
|
} |
76 |
|
|
|
77 |
misc |
630 |
subversion::snapshot { $templates_dir: |
78 |
misc |
628 |
source => "svn://svn.mageia.org/svn/web/templates/transifex/trunk" |
79 |
|
|
} |
80 |
|
|
|
81 |
misc |
616 |
apache::vhost_django_app { "transifex.$domain": |
82 |
|
|
module => "transifex", |
83 |
misc |
622 |
use_ssl => true, |
84 |
misc |
632 |
module_path => ["/usr/share/transifex","/usr/share","/usr/local/lib/"] |
85 |
misc |
622 |
} |
86 |
|
|
|
87 |
|
|
apache::vhost_redirect_ssl { "transifex.$domain": } |
88 |
|
|
|
89 |
dmorgan |
177 |
} |