aboutsummaryrefslogtreecommitdiffstats
path: root/modules/catdap/manifests
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-05 18:12:50 +0000
committerMichael Scherer <misc@mageia.org>2011-01-05 18:12:50 +0000
commita7e0febd9ea2874f4a2f44e95c5b90b26a4b6069 (patch)
treea31f2ccb3c6ca4764d910b6f64851605a92408ce /modules/catdap/manifests
parent97ae3ba47abc0ca70e76ace24199bdabdedc3fee (diff)
downloadpuppet-a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069.tar
puppet-a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069.tar.gz
puppet-a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069.tar.bz2
puppet-a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069.tar.xz
puppet-a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069.zip
- deploy trunk as a test instance, as asked several time on irc
Diffstat (limited to 'modules/catdap/manifests')
-rw-r--r--modules/catdap/manifests/init.pp49
1 files changed, 31 insertions, 18 deletions
diff --git a/modules/catdap/manifests/init.pp b/modules/catdap/manifests/init.pp
index 634a9d7f..f104d3e0 100644
--- a/modules/catdap/manifests/init.pp
+++ b/modules/catdap/manifests/init.pp
@@ -1,7 +1,6 @@
class catdap {
- $catdap_location = "/var/www/identity"
- $catdap_vhost = "identity.$domain"
+ $upstream_svn = "svn://svn.mageia.org/svn/soft/identity/CatDap/"
# TODO switch to a proper rpm packaging
$rpm_requirement = ['perl-Catalyst-Runtime',"perl-FCGI", 'perl-Catalyst-Plugin-Authorization-Roles',
@@ -17,27 +16,41 @@ class catdap {
ensure => installed
}
- subversion::snapshot { $catdap_location:
- source => "svn://svn.mageia.org/svn/soft/identity/CatDap/branches/live"
- }
-
$ldap_password = extlookup('catdap_ldap','x')
- file { "$catdap_location/catdap_local.yml":
- ensure => present,
- owner => root,
- group => apache,
- mode => 640,
- content => template("catdap/catdap_local.yml"),
- require => Subversion::Snapshot[$catdap_location]
+
+
+ define catdap_snapshot($location, $svn_location) {
+ file { "$location/catdap_local.yml":
+ ensure => present,
+ owner => root,
+ group => apache,
+ mode => 640,
+ content => template("catdap/catdap_local.yml"),
+ require => Subversion::Snapshot[$location],
+ }
+
+ subversion::snapshot { $location:
+ source => $svn_location
+ }
+
+ apache::vhost_catalyst_app { $name:
+ script => "$location/script/catdap_fastcgi.pl",
+ location => $location,
+ use_ssl => true,
+ }
+
+ apache::vhost_redirect_ssl { $name: }
}
- apache::vhost_catalyst_app { $catdap_vhost:
- script => "$catdap_location/script/catdap_fastcgi.pl",
- location => $catdap_location,
- use_ssl => true,
+ catdap_snapshot { "identity.$domain":
+ location => "/var/www/identity",
+ svn_location => "$upstream_svn/branches/live"
}
- apache::vhost_redirect_ssl { $catdap_vhost: }
+ catdap_snapshot { "identity-trunk.$domain":
+ location => "/var/www/identity-trunk",
+ svn_location => "$upstream_svn/trunk"
+ }
}