Reload vhost changes, not restart

We can 'apache2 reload' vhost changes, which avoids apache stop /
start and downtime for jobs.

Change-Id: Idf44ec7cea09538687ddfccaeb3bea2fe6b7cf10
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-08-25 10:32:11 -04:00
parent efd4267ef4
commit ed292951cc
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 12 additions and 5 deletions

View File

@ -21,10 +21,17 @@ class httpd {
}
service { 'httpd':
ensure => running,
name => $httpd::params::apache_name,
enable => true,
subscribe => Package['httpd'],
ensure => running,
name => $httpd::params::apache_name,
enable => true,
subscribe => Package['httpd'],
hasrestart => true,
}
exec { 'httpd-reload':
command => "/usr/sbin/service ${httpd::params::apache_name} reload",
refreshonly => true,
require => Service['httpd'],
}
file { 'httpd_vdir':

View File

@ -94,7 +94,7 @@ define httpd::vhost(
group => 'root',
mode => '0755',
require => Package['httpd'],
notify => Service['httpd'],
notify => Exec['httpd-reload'],
}
if $configure_firewall {