aboutsummaryrefslogtreecommitdiffstats
path: root/modules/catdap
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-04 17:51:05 +0000
committerMichael Scherer <misc@mageia.org>2010-11-04 17:51:05 +0000
commitfa0b4e76d515b2c6fb4764600135c58e35810dbb (patch)
treef885637320f043a0a31b48e6773cf741e9d6488b /modules/catdap
parent6472f29d5e900404f67a98cfb8cfafba008219b6 (diff)
downloadpuppet-fa0b4e76d515b2c6fb4764600135c58e35810dbb.tar
puppet-fa0b4e76d515b2c6fb4764600135c58e35810dbb.tar.gz
puppet-fa0b4e76d515b2c6fb4764600135c58e35810dbb.tar.bz2
puppet-fa0b4e76d515b2c6fb4764600135c58e35810dbb.tar.xz
puppet-fa0b4e76d515b2c6fb4764600135c58e35810dbb.zip
- refactor the vhost
- fix the url used for svn checkout - add a requires from catdap config to svn checkout for ordering purpose - move extlookup call outside of template - fix the name of apache config file - fix the naming of the ldap server
Diffstat (limited to 'modules/catdap')
-rw-r--r--modules/catdap/manifests/init.pp11
-rw-r--r--modules/catdap/templates/catdap_local.yml4
-rw-r--r--modules/catdap/templates/catdap_vhost.conf2
3 files changed, 10 insertions, 7 deletions
diff --git a/modules/catdap/manifests/init.pp b/modules/catdap/manifests/init.pp
index bbd96bb4..74abcffd 100644
--- a/modules/catdap/manifests/init.pp
+++ b/modules/catdap/manifests/init.pp
@@ -5,6 +5,7 @@ class catdap {
include apache::mod_fcgid
$catdap_location = "/var/www/identity"
+ $catdap_vhost = "identity.$domain"
# TODO switch to a proper rpm packaging
$rpm_requirement = ['perl-Catalyst-Runtime',
@@ -19,7 +20,7 @@ class catdap {
}
subversion::snapshot { $catdap_location:
- source => "svn+ssh://svn.mageia.org/srv/mx2-dd0/svn/soft/identity/CatDap/branches/live"
+ source => "svn://svn.mageia.org/soft/identity/CatDap/branches/live"
}
# add a catdap config file
@@ -27,12 +28,14 @@ class catdap {
ensure => present,
owner => apache,
mode => 600,
- content => template("catdap/catdap_local.yml")
+ content => template("catdap/catdap_local.yml"),
+ require => Subversion::Snapshot[$catdap_location]
}
+ $catdap_password = extlookup('catdap_password')
# add a apache vhost
- file { "identity.$domain.conf":
- path => "/etc/httpd/conf/vhosts.d/$name",
+ file { "$catdap_vhost.conf":
+ path => "/etc/httpd/conf/vhosts.d/$catdap_vhost.conf",
ensure => "present",
owner => root,
group => root,
diff --git a/modules/catdap/templates/catdap_local.yml b/modules/catdap/templates/catdap_local.yml
index ec9f2753..c5299ef0 100644
--- a/modules/catdap/templates/catdap_local.yml
+++ b/modules/catdap/templates/catdap_local.yml
@@ -3,9 +3,9 @@
dc_suffix = 'dc=' + domain.gsub('.',',dc=')
-ldap_server = 'ldap' + domain
+ldap_server = 'ldap.' + domain
-ldap_password = extlookup('catdap_password')
+ldap_password = catdap_password
ldap_account = 'cn=catdap-valstar,ou=System Accounts,' + dc_suffix
%>
diff --git a/modules/catdap/templates/catdap_vhost.conf b/modules/catdap/templates/catdap_vhost.conf
index 6569e164..a6a2f0b9 100644
--- a/modules/catdap/templates/catdap_vhost.conf
+++ b/modules/catdap/templates/catdap_vhost.conf
@@ -1,5 +1,5 @@
<VirtualHost *:80>
- ServerName identity.<%= domain %>
+ ServerName <%= catdap_vhost %>
# Serve static content directly
DocumentRoot <%= catdap_location %>/root
Alias /static <%= catdap_location %>/root/static