summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp10
1 files changed, 9 insertions, 1 deletions
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":