From 50127c9cb30591647e0ee6cd8d62750b6b5cbc0e Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 8 Jan 2012 20:25:11 +0000 Subject: clean viewvc module, some refactoring --- modules/viewvc/manifests/init.pp | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) (limited to 'modules/viewvc/manifests/init.pp') diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp index 37e62e3d..8912b574 100644 --- a/modules/viewvc/manifests/init.pp +++ b/modules/viewvc/manifests/init.pp @@ -1,46 +1,31 @@ class viewvc { - package { ['viewvc','python-svn','python-flup']: - ensure => installed - } + package { ['viewvc','python-svn','python-flup']: } # http_expiration_time = 600 # svn_roots = admin: svn://svn.mageia.org/svn/adm/ - file { 'viewvc.conf': - ensure => present, - path => '/etc/viewvc/viewvc.conf', + file { '/etc/viewvc/viewvc.conf': content => template('viewvc/viewvc.conf'), notify => Service['apache'], - require => Package['viewvc'] + require => Package['viewvc'], } - file { 'webapps.d/viewvc.conf': - ensure => present, - path => '/etc/httpd/conf/webapps.d/viewvc.conf', + apache::webapp_other { 'viewvc': content => template('viewvc/webapp.conf'), - notify => Service['apache'], - require => Package['apache'], } - $kill_viewvc_path = '/usr/local/sbin/kill_viewvc' - file { "$kill_viewvc_path": - ensure => present, - mode => 755, - owner => root, - group => root, - content => template('viewvc/kill_viewvc.sh'), + local_script { "kill_viewvc": + content => template('viewvc/kill_viewvc.sh'), } cron { 'kill_viewvc': - command => "$kill_viewvc_path", - hour => "*", - minute => "*/5", - user => "apache", - environment => "MAILTO=root", + command => "/usr/local/bin/kill_viewvc", + hour => "*", + minute => "*/5", + user => "apache", + environment => "MAILTO=root", } - # need newer version of viewvc apache::vhost_base { "svnweb.$domain": - # TODO created a full fledged type aliases => { "/viewvc" => "/var/www/viewvc/", "/" => "/usr/share/viewvc/bin/wsgi/viewvc.fcgi/" }, content => template("viewvc/vhost.conf") -- cgit v1.2.1