diff options
author | Michael Scherer <misc@mageia.org> | 2011-01-05 18:12:50 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-01-05 18:12:50 +0000 |
commit | a7e0febd9ea2874f4a2f44e95c5b90b26a4b6069 (patch) | |
tree | a31f2ccb3c6ca4764d910b6f64851605a92408ce /modules/catdap | |
parent | 97ae3ba47abc0ca70e76ace24199bdabdedc3fee (diff) | |
download | puppet-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')
-rw-r--r-- | modules/catdap/manifests/init.pp | 49 |
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" + } } |