1 |
dmorgan |
177 |
class transifex { |
2 |
misc |
618 |
|
3 |
|
|
package { ['transifex','python-psycopg2','python-django-auth-ldap']: |
4 |
dmorgan |
177 |
ensure => installed |
5 |
|
|
} |
6 |
dmorgan |
240 |
|
7 |
misc |
378 |
$password = extlookup("transifex_password",'x') |
8 |
misc |
618 |
$ldap_password = extlookup("transifex_ldap",'x') |
9 |
misc |
614 |
|
10 |
|
|
@@postgresql::user { 'transifex': |
11 |
|
|
password => $password, |
12 |
|
|
} |
13 |
|
|
|
14 |
|
|
@@postgresql::database { 'transifex': |
15 |
|
|
description => "Transifex database", |
16 |
|
|
user => "transifex", |
17 |
|
|
require => Postgresql::User['transifex'] |
18 |
|
|
} |
19 |
|
|
|
20 |
misc |
191 |
file { "20-engines.conf": |
21 |
dmorgan |
177 |
path => "/etc/transifex/20-engines.conf", |
22 |
|
|
ensure => present, |
23 |
|
|
owner => root, |
24 |
misc |
340 |
group => apache, |
25 |
|
|
mode => 640, |
26 |
misc |
455 |
content => template("transifex/20-engines.conf"), |
27 |
misc |
615 |
require => Package['transifex'], |
28 |
|
|
notify => Service['apache'] |
29 |
dmorgan |
177 |
} |
30 |
misc |
265 |
|
31 |
dmorgan |
295 |
file { "30-site.conf": |
32 |
|
|
path => "/etc/transifex/30-site.conf", |
33 |
|
|
ensure => present, |
34 |
|
|
owner => root, |
35 |
|
|
group => root, |
36 |
misc |
340 |
mode => 644, |
37 |
misc |
455 |
content => template("transifex/30-site.conf"), |
38 |
misc |
615 |
require => Package['transifex'], |
39 |
|
|
notify => Service['apache'] |
40 |
dmorgan |
295 |
} |
41 |
|
|
|
42 |
misc |
617 |
file { "40-apps.conf": |
43 |
|
|
path => "/etc/transifex/40-apps.conf", |
44 |
|
|
ensure => present, |
45 |
|
|
owner => root, |
46 |
|
|
group => root, |
47 |
|
|
mode => 644, |
48 |
|
|
content => template("transifex/40-apps.conf"), |
49 |
|
|
require => Package['transifex'], |
50 |
|
|
notify => Service['apache'] |
51 |
|
|
} |
52 |
|
|
|
53 |
misc |
618 |
file { "45-ldap.conf": |
54 |
|
|
path => "/etc/transifex/45-ldap.conf", |
55 |
|
|
ensure => present, |
56 |
|
|
owner => root, |
57 |
|
|
group => root, |
58 |
|
|
mode => 644, |
59 |
|
|
content => template("transifex/45-ldap.conf"), |
60 |
|
|
require => Package['transifex'], |
61 |
|
|
notify => Service['apache'] |
62 |
|
|
} |
63 |
|
|
|
64 |
misc |
616 |
apache::vhost_django_app { "transifex.$domain": |
65 |
|
|
module => "transifex", |
66 |
misc |
622 |
use_ssl => true, |
67 |
misc |
616 |
module_path => ["/usr/share/transifex","/usr/share"] |
68 |
misc |
622 |
} |
69 |
|
|
|
70 |
|
|
apache::vhost_redirect_ssl { "transifex.$domain": } |
71 |
|
|
|
72 |
dmorgan |
177 |
} |