aboutsummaryrefslogtreecommitdiffstats
path: root/modules/viewvc/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/viewvc/manifests/init.pp')
-rw-r--r--modules/viewvc/manifests/init.pp70
1 files changed, 55 insertions, 15 deletions
diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp
index b7c40202..bd676f29 100644
--- a/modules/viewvc/manifests/init.pp
+++ b/modules/viewvc/manifests/init.pp
@@ -1,11 +1,16 @@
class viewvc {
- package { ['viewvc','python-svn','python-flup']: }
+ include apache::mod::fcgid
+ include viewvc::var
+ package {['viewvc',
+ 'python2-svn',
+ 'python-flup']: }
+
# http_expiration_time = 600
# svn_roots = admin: svn://svn.mageia.org/svn/adm/
file { '/etc/viewvc/viewvc.conf':
- content => template('viewvc/viewvc.conf'),
- notify => Service['apache'],
+ content => template($viewvc::var::tmpl_viewvc_conf),
+ notify => Service['apache'],
require => Package['viewvc'],
}
@@ -13,22 +18,57 @@ class viewvc {
webapp_file => 'viewvc/webapp.conf',
}
- local_script { "kill_viewvc":
- content => template('viewvc/kill_viewvc.sh'),
+ mga_common::local_script { 'kill_viewvc':
+ content => template('viewvc/kill_viewvc.sh'),
}
cron { 'kill_viewvc':
- command => "/usr/local/bin/kill_viewvc",
- hour => "*",
- minute => "*/5",
- user => "apache",
- environment => "MAILTO=root",
+ command => '/usr/local/bin/kill_viewvc',
+ hour => '*',
+ minute => '*/5',
+ user => 'apache',
+ environment => 'MAILTO=root',
}
- apache::vhost_base { "svnweb.$domain":
- aliases => { "/viewvc" => "/var/www/viewvc/",
- "/" => "/usr/share/viewvc/bin/wsgi/viewvc.fcgi/" },
- content => template("viewvc/vhost.conf")
+ $viewvc_docroot = '/usr/share/viewvc/templates/docroot'
+ $robotsfile = "$viewvc_docroot/robots.txt"
+ file { $robotsfile:
+ ensure => present,
+ mode => '0644',
+ owner => root,
+ group => root,
+ source => 'puppet:///modules/viewvc/robots.txt',
+ }
+
+ file { "$viewvc_docroot/setcookieredirect.html":
+ ensure => present,
+ mode => '0644',
+ owner => root,
+ group => root,
+ source => 'puppet:///modules/viewvc/setcookieredirect.html',
}
-}
+ $vhost_aliases = {
+ '/viewvc' => $viewvc_docroot,
+ '/robots.txt' => $robotsfile,
+ '/_check' => "$viewvc_docroot/setcookieredirect.html",
+ }
+
+ $script_aliases = {
+ '/' => '/usr/share/viewvc/bin/wsgi/viewvc.fcgi/',
+ }
+
+ $process = 4
+
+ apache::vhost::base { $viewvc::var::hostname:
+ aliases => $vhost_aliases,
+ content => template('apache/vhost_fcgid_norobot.conf'),
+ }
+
+ apache::vhost::base { "ssl_${viewvc::var::hostname}":
+ vhost => $viewvc::var::hostname,
+ use_ssl => true,
+ aliases => $vhost_aliases,
+ content => template('apache/vhost_fcgid_norobot.conf'),
+ }
+}