From 4037f9ba6266dfc70bc529d3c5152efb185b4299 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Fri, 11 Jul 2008 15:48:33 -0400 Subject: Fixing httpd restart --- manifests/init.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index fe5e9a5..3518628 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,6 +8,14 @@ class django::server { require => Package["httpd"], } + # If 'service httpd start' and 'service httpd restart' are run to closely + # together the restart will fail. This is a workaround. + exec { "graceful-apache": + command => "/sbin/service httpd graceful", + refreshonly => true, + require => Package["httpd"], + } + file { "/etc/httpd/conf.d/django.conf": ensure => present, owner => "root", @@ -15,7 +23,7 @@ class django::server { mode => 0644, source => "puppet:///django/django.conf", require => [Package["httpd"],Package["mod_python"], Exec["Checkout django example"]], - notify => Service["httpd"], + notify => Exec["graceful-apache"], } exec { "Checkout django example": -- cgit