aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/viewvc/manifests/init.pp7
-rw-r--r--modules/viewvc/manifests/var.pp9
2 files changed, 13 insertions, 3 deletions
diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp
index 49d8cb03..a3acf918 100644
--- a/modules/viewvc/manifests/init.pp
+++ b/modules/viewvc/manifests/init.pp
@@ -1,4 +1,5 @@
class viewvc {
+ include viewvc::var
package {['viewvc',
'python-svn',
'python-flup']: }
@@ -7,7 +8,7 @@ class viewvc {
# svn_roots = admin: svn://svn.mageia.org/svn/adm/
file { '/etc/viewvc/viewvc.conf':
- content => template('viewvc/viewvc.conf'),
+ content => template($viewvc::var::tmpl_viewvc_conf),
notify => Service['apache'],
require => Package['viewvc'],
}
@@ -37,11 +38,11 @@ class viewvc {
source => 'puppet:///modules/viewvc/robots.txt',
}
- apache::vhost::base { "svnweb.$::domain":
+ apache::vhost::base { $viewvc::var::hostname:
aliases => {'/viewvc' => '/var/www/viewvc/',
'/robots.txt' => $robotsfile,
'/' => '/usr/share/viewvc/bin/wsgi/viewvc.fcgi/'},
- content => template('viewvc/vhost.conf')
+ content => template('viewvc/vhost.conf'),
}
}
diff --git a/modules/viewvc/manifests/var.pp b/modules/viewvc/manifests/var.pp
new file mode 100644
index 00000000..c2fcef5b
--- /dev/null
+++ b/modules/viewvc/manifests/var.pp
@@ -0,0 +1,9 @@
+# $hostname:
+# vhost used by viewvc
+# $tmpl_viewvc_conf:
+# path to /etc/viewvc.conf template file
+class viewvc::var(
+ $hostname = "svnweb.$::domain",
+ $tmpl_viewvc_conf = 'viewvc/viewvc.conf'
+) {
+}