From e7446275c1f5198a0f9c0e0aec8231d266beff8c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 5 Nov 2010 23:41:36 +0000 Subject: - refactor catalyst application config using a common class ( catdap is next ) --- modules/epoll/manifests/init.pp | 18 +++++------------- modules/epoll/templates/epoll_vhost.conf | 13 ------------- modules/mga-mirrors/manifests/init.pp | 15 +++------------ modules/mga-mirrors/templates/mirrors_vhost.conf | 13 ------------- 4 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 modules/epoll/templates/epoll_vhost.conf delete mode 100644 modules/mga-mirrors/templates/mirrors_vhost.conf diff --git a/modules/epoll/manifests/init.pp b/modules/epoll/manifests/init.pp index cd1349fa..af0466b2 100644 --- a/modules/epoll/manifests/init.pp +++ b/modules/epoll/manifests/init.pp @@ -1,23 +1,15 @@ class epoll { - include apache::mod_fastcgi - $vhost = "epoll.$domain" + package { 'Epoll': ensure => installed } - - # add a apache vhost - file { "$vhost.conf": - path => "/etc/httpd/conf/vhosts.d/$vhost.conf", - ensure => "present", - owner => root, - group => root, - mode => 644, - notify => Service['apache'], - content => template("epoll/epoll_vhost.conf") + + apache::vhost_catalyst_app { $vhost: + script => /usr/bin/epoll_fastcgi.pl } - + $password = extlookup("epoll_password") file { "epoll.yml": diff --git a/modules/epoll/templates/epoll_vhost.conf b/modules/epoll/templates/epoll_vhost.conf deleted file mode 100644 index 272aaa28..00000000 --- a/modules/epoll/templates/epoll_vhost.conf +++ /dev/null @@ -1,13 +0,0 @@ - - ServerName <%= vhost %> - # Serve static content directly - DocumentRoot /dev/null - - Alias / /usr/bin/epoll_fastcgi.pl/ - FastCgiServer /usr/bin/epoll_fastcgi.pl -processes 4 -idle-timeout 30 - - - Allow from all - - - diff --git a/modules/mga-mirrors/manifests/init.pp b/modules/mga-mirrors/manifests/init.pp index 0d477f27..2bf927f3 100644 --- a/modules/mga-mirrors/manifests/init.pp +++ b/modules/mga-mirrors/manifests/init.pp @@ -2,23 +2,14 @@ class mga-mirrors { $vhost = "mirrors.$domain" - include apache::mod_fastcgi - package { 'mga-mirrors': ensure => installed } - # add a apache vhost - file { "$vhost.conf": - path => "/etc/httpd/conf/vhosts.d/$vhost.conf", - ensure => "present", - owner => root, - group => root, - mode => 644, - notify => Service['apache'], - content => template("mga-mirrors/mirrors_vhost.conf") + apache::vhost_catalyst_app { $vhost: + script => /usr/bin/mga_mirrors_fastcgi.pl } - + $password = extlookup("mga_mirror_password") file { "mga-mirrors.ini": diff --git a/modules/mga-mirrors/templates/mirrors_vhost.conf b/modules/mga-mirrors/templates/mirrors_vhost.conf deleted file mode 100644 index 33f27513..00000000 --- a/modules/mga-mirrors/templates/mirrors_vhost.conf +++ /dev/null @@ -1,13 +0,0 @@ - - ServerName <%= vhost %> - # Serve static content directly - DocumentRoot /dev/null - - Alias / /usr/bin/mga_mirrors_fastcgi.pl/ - FastCgiServer /usr/bin/mga_mirrors_fastcgi.pl -processes 4 -idle-timeout 30 - - - Allow from all - - - -- cgit v1.2.1