1 |
class catdap { |
class catdap { |
2 |
|
|
3 |
$catdap_location = "/var/www/identity" |
$upstream_svn = "svn://svn.mageia.org/svn/soft/identity/CatDap/" |
|
$catdap_vhost = "identity.$domain" |
|
4 |
|
|
5 |
# TODO switch to a proper rpm packaging |
# TODO switch to a proper rpm packaging |
6 |
$rpm_requirement = ['perl-Catalyst-Runtime',"perl-FCGI", 'perl-Catalyst-Plugin-Authorization-Roles', |
$rpm_requirement = ['perl-Catalyst-Runtime',"perl-FCGI", 'perl-Catalyst-Plugin-Authorization-Roles', |
16 |
ensure => installed |
ensure => installed |
17 |
} |
} |
18 |
|
|
|
subversion::snapshot { $catdap_location: |
|
|
source => "svn://svn.mageia.org/svn/soft/identity/CatDap/branches/live" |
|
|
} |
|
|
|
|
19 |
$ldap_password = extlookup('catdap_ldap','x') |
$ldap_password = extlookup('catdap_ldap','x') |
20 |
|
|
21 |
file { "$catdap_location/catdap_local.yml": |
|
22 |
ensure => present, |
|
23 |
owner => root, |
define catdap_snapshot($location, $svn_location) { |
24 |
group => apache, |
file { "$location/catdap_local.yml": |
25 |
mode => 640, |
ensure => present, |
26 |
content => template("catdap/catdap_local.yml"), |
owner => root, |
27 |
require => Subversion::Snapshot[$catdap_location] |
group => apache, |
28 |
|
mode => 640, |
29 |
|
content => template("catdap/catdap_local.yml"), |
30 |
|
require => Subversion::Snapshot[$location], |
31 |
|
} |
32 |
|
|
33 |
|
subversion::snapshot { $location: |
34 |
|
source => $svn_location |
35 |
|
} |
36 |
|
|
37 |
|
apache::vhost_catalyst_app { $name: |
38 |
|
script => "$location/script/catdap_fastcgi.pl", |
39 |
|
location => $location, |
40 |
|
use_ssl => true, |
41 |
|
} |
42 |
|
|
43 |
|
apache::vhost_redirect_ssl { $name: } |
44 |
} |
} |
45 |
|
|
46 |
apache::vhost_catalyst_app { $catdap_vhost: |
catdap_snapshot { "identity.$domain": |
47 |
script => "$catdap_location/script/catdap_fastcgi.pl", |
location => "/var/www/identity", |
48 |
location => $catdap_location, |
svn_location => "$upstream_svn/branches/live" |
|
use_ssl => true, |
|
49 |
} |
} |
50 |
|
|
51 |
apache::vhost_redirect_ssl { $catdap_vhost: } |
catdap_snapshot { "identity-trunk.$domain": |
52 |
|
location => "/var/www/identity-trunk", |
53 |
|
svn_location => "$upstream_svn/trunk" |
54 |
|
} |
55 |
|
|
56 |
} |
} |