Loading manifests/module.pp +21 −7 Original line number Diff line number Diff line Loading @@ -7,9 +7,13 @@ # su_apache::module { "rewrite": ensure => present } # # This infrastructure, and therefore this define, is only available on Debian. # # $restart_apache: restart the Apache service. Defaults to true; set to # false for Docker container builds. define su_apache::module( Enum['present', 'absent'] $ensure = undef, Boolean $restart_apache = true, ) { if ($::operatingsystem != 'debian') and ($::operatingsystem != 'ubuntu') { fail("Unsupported su_apache::module operating system ${::operatingsystem}") Loading @@ -30,11 +34,21 @@ define su_apache::module( } # Enable or disable the module using a2enmod or a2dismod. if ($restart_apache) { # DO an Apache service restart. exec { $cmd: command => $cmd, path => '/usr/sbin:/usr/bin', require => Package['apache'], unless => "[ $condition ]", notify => Exec['su_apache_reload'], } } else { # DON'T do an Apache service restart. exec { $cmd: command => $cmd, path => '/usr/sbin:/usr/bin', require => Package['apache'], unless => "[ $condition ]", notify => Exec['su_apache_reload']; } } Loading
manifests/module.pp +21 −7 Original line number Diff line number Diff line Loading @@ -7,9 +7,13 @@ # su_apache::module { "rewrite": ensure => present } # # This infrastructure, and therefore this define, is only available on Debian. # # $restart_apache: restart the Apache service. Defaults to true; set to # false for Docker container builds. define su_apache::module( Enum['present', 'absent'] $ensure = undef, Boolean $restart_apache = true, ) { if ($::operatingsystem != 'debian') and ($::operatingsystem != 'ubuntu') { fail("Unsupported su_apache::module operating system ${::operatingsystem}") Loading @@ -30,11 +34,21 @@ define su_apache::module( } # Enable or disable the module using a2enmod or a2dismod. if ($restart_apache) { # DO an Apache service restart. exec { $cmd: command => $cmd, path => '/usr/sbin:/usr/bin', require => Package['apache'], unless => "[ $condition ]", notify => Exec['su_apache_reload'], } } else { # DON'T do an Apache service restart. exec { $cmd: command => $cmd, path => '/usr/sbin:/usr/bin', require => Package['apache'], unless => "[ $condition ]", notify => Exec['su_apache_reload']; } }