1 |
class transifex { |
class transifex { |
2 |
package { ['transifex','python-psycopg2']: |
|
3 |
|
package { ['transifex','python-psycopg2','python-django-auth-ldap']: |
4 |
ensure => installed |
ensure => installed |
5 |
} |
} |
6 |
|
|
7 |
$password = extlookup("transifex_password",'x') |
$pgsql_password = extlookup("transifex_pgsql",'x') |
8 |
|
$ldap_password = extlookup("transifex_ldap",'x') |
9 |
|
|
10 |
@@postgresql::user { 'transifex': |
@@postgresql::user { 'transifex': |
11 |
password => $password, |
password => $pgsql_password, |
12 |
} |
} |
13 |
|
|
14 |
@@postgresql::database { 'transifex': |
@@postgresql::database { 'transifex': |
50 |
notify => Service['apache'] |
notify => Service['apache'] |
51 |
} |
} |
52 |
|
|
53 |
|
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 |
apache::vhost_django_app { "transifex.$domain": |
apache::vhost_django_app { "transifex.$domain": |
65 |
module => "transifex", |
module => "transifex", |
66 |
|
use_ssl => true, |
67 |
module_path => ["/usr/share/transifex","/usr/share"] |
module_path => ["/usr/share/transifex","/usr/share"] |
68 |
} |
} |
69 |
|
|
70 |
|
apache::vhost_redirect_ssl { "transifex.$domain": } |
71 |
|
|
72 |
} |
} |