aboutsummaryrefslogtreecommitdiffstats
path: root/modules/viewvc/manifests
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-23 15:07:56 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-23 15:07:56 +0000
commit77d6558cec01487de84983e4ecfe40107697155e (patch)
treecb5230c5f07a5283d0a70582a1d7148bc41646a8 /modules/viewvc/manifests
parent62b42993b86e6fcedbe947d960e0b870d6b0f18f (diff)
downloadpuppet-77d6558cec01487de84983e4ecfe40107697155e.tar
puppet-77d6558cec01487de84983e4ecfe40107697155e.tar.gz
puppet-77d6558cec01487de84983e4ecfe40107697155e.tar.bz2
puppet-77d6558cec01487de84983e4ecfe40107697155e.tar.xz
puppet-77d6558cec01487de84983e4ecfe40107697155e.zip
Add viewvc::var class for viewvc options
Add options in viewvc::var to be able to change the vhost used by viewvc, and the template file used for /etc/viewvc/viewvc.conf.
Diffstat (limited to 'modules/viewvc/manifests')
-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'
+) {
+}