Skip to content

Commit

Permalink
Merge pull request #993 from tphoney/removing_whitespace
Browse files Browse the repository at this point in the history
modules-1559 Apache module no service refresh
  • Loading branch information
Morgan Haskel committed Jan 22, 2015
2 parents dd06847 + da59ce6 commit db0d240
Show file tree
Hide file tree
Showing 46 changed files with 116 additions and 54 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ Determines whether the service should be running. Valid values are 'true', 'fals

Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

#####`service_manage`

Determines whether the HTTPD service state is managed by Puppet . Defaults to 'true'.

#####`trace_enable`

Controls how TRACE requests per RFC 2616 are handled. More information about [TraceEnable](http://httpd.apache.org/docs/current/mod/core.html#traceenable). Defaults to 'On'.
Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$default_ssl_crl_check = undef,
$ip = undef,
$service_enable = true,
$service_manage = true,
$service_ensure = 'running',
$purge_configs = true,
$purge_vhost_dir = undef,
Expand Down Expand Up @@ -72,6 +73,7 @@
validate_bool($default_confd_files)
# true/false is sufficient for both ensure and enable
validate_bool($service_enable)
validate_bool($service_manage)

$valid_mpms_re = $apache_version ? {
'2.4' => '(event|itk|peruser|prefork|worker)',
Expand Down Expand Up @@ -126,6 +128,7 @@
class { '::apache::service':
service_name => $service_name,
service_enable => $service_enable,
service_manage => $service_manage,
service_ensure => $service_ensure,
}

Expand Down
6 changes: 3 additions & 3 deletions manifests/mod.pp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
Exec["mkdir ${mod_dir}"],
],
before => File[$mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

if $::osfamily == 'Debian' {
Expand All @@ -105,7 +105,7 @@
Exec["mkdir ${enable_dir}"],
],
before => File[$enable_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
# Each module may have a .conf file as well, which should be
# defined in the class apache::mod::module
Expand All @@ -123,7 +123,7 @@
Exec["mkdir ${enable_dir}"],
],
before => File[$enable_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/alias.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
content => template('apache/mod/alias.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/authnz_ldap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
content => template('apache/mod/authnz_ldap.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/autoindex.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
content => template('apache/mod/autoindex.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/cgid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
content => template('apache/mod/cgid.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
}
2 changes: 1 addition & 1 deletion manifests/mod/dav_fs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
content => template('apache/mod/dav_fs.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/deflate.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
content => template('apache/mod/deflate.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/dir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
content => template('apache/mod/dir.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/disk_cache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
content => template('apache/mod/disk_cache.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/event.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
content => template('apache/mod/event.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

case $::osfamily {
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/fastcgi.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
content => template('apache/mod/fastcgi.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/fcgid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
content => template('apache/mod/fcgid.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/info.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
content => template('apache/mod/info.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/itk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
content => template('apache/mod/itk.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

case $::osfamily {
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/ldap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
content => template('apache/mod/ldap.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/mime.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
content => template('apache/mod/mime.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
if $mime_support_package {
package { $mime_support_package:
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/mime_magic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
content => template('apache/mod/mime_magic.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/negotiation.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
content => template('apache/mod/negotiation.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/nss.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
content => template('apache/mod/nss.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/pagespeed.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
content => template('apache/mod/pagespeed.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/passenger.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@
content => template('apache/mod/passenger.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/peruser.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
content => template('apache/mod/peruser.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
file { "${::apache::mod_dir}/peruser":
ensure => directory,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/php.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
Exec["mkdir ${::apache::mod_dir}"],
],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
4 changes: 2 additions & 2 deletions manifests/mod/prefork.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
content => template('apache/mod/prefork.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

case $::osfamily {
Expand All @@ -56,7 +56,7 @@
line => '#HTTPD=/usr/sbin/httpd.worker',
match => '#?HTTPD=/usr/sbin/httpd.worker',
require => Package['httpd'],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
content => template('apache/mod/proxy.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/proxy_html.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
content => template('apache/mod/proxy_html.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/reqtimeout.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
content => template('apache/mod/reqtimeout.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/rpaf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
content => template('apache/mod/rpaf.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
4 changes: 2 additions & 2 deletions manifests/mod/security.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
path => "${::apache::mod_dir}/security.conf",
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

file { $modsec_dir:
Expand All @@ -56,7 +56,7 @@
ensure => file,
content => template('apache/mod/security_crs.conf.erb'),
require => File[$modsec_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

apache::security::rule_link { $activated_rules: }
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/setenvif.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
content => template('apache/mod/setenvif.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/ssl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
content => template('apache/mod/ssl.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/status.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
content => template('apache/mod/status.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
2 changes: 1 addition & 1 deletion manifests/mod/suphp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
content => template('apache/mod/suphp.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd']
notify => Class['apache::service'],
}
}

2 changes: 1 addition & 1 deletion manifests/mod/userdir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
content => template('apache/mod/userdir.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
4 changes: 2 additions & 2 deletions manifests/mod/worker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
content => template('apache/mod/worker.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
notify => Class['apache::service'],
}

case $::osfamily {
Expand All @@ -58,7 +58,7 @@
line => 'HTTPD=/usr/sbin/httpd.worker',
match => '#?HTTPD=/usr/sbin/httpd.worker',
require => Package['httpd'],
notify => Service['httpd'],
notify => Class['apache::service'],
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod/wsgi.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
content => template('apache/mod/wsgi.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd']
notify => Class['apache::service'],
}
}

Loading

0 comments on commit db0d240

Please sign in to comment.