From d186ff759ee7e122a7767ce7e8c50f86cd6a2c9e Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 22 Nov 2011 23:57:55 +0100 Subject: as file_line lacks ensure => absent, we have to do it with a sed --- manifests/centos/itk_plus.pp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'manifests/centos') diff --git a/manifests/centos/itk_plus.pp b/manifests/centos/itk_plus.pp index c034e8b..9bcd8ca 100644 --- a/manifests/centos/itk_plus.pp +++ b/manifests/centos/itk_plus.pp @@ -1,7 +1,12 @@ # http://hostby.net/home/2008/07/12/centos-5-and-mpm-itk/ class apache::centos::itk_plus inherits apache::centos::itk { - File_line['pidfile_httpd.conf','listen_httpd.conf']{ - ensure => absent, + Exec['adjust_pidfile']{ + command => "sed -i 's/^PidFile \(.*\)/#PidFile \1/g' /etc/httpd/conf/httpd.conf", + unless => "grep -qE '^#PidFile ' /etc/httpd/conf/httpd.conf", + } + Exec['adjust_listen']{ + command => "sed -i 's/^Listen \(.*\)/#Listen \1/g' /etc/httpd/conf/httpd.conf", + unless => "grep -qE '^#Listen ' /etc/httpd/conf/httpd.conf", } Apache::Config::Global['00-listen.conf']{ -- cgit v1.2.3