Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions manifests/file.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
$source = undef,
$content = undef,
) {

include ::apache_httpd::install
include ::apache_httpd::service

file { "${confd}/${title}":
ensure => $ensure,
owner => $owner,
Expand Down
11 changes: 3 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
) inherits ::apache_httpd::params {

include '::apache_httpd::install'
class { '::apache_httpd::service':
service_restart => $service_restart
}

# Our own pre-configured file (disable nearly everything)
file { '/etc/httpd/conf/httpd.conf':
Expand Down Expand Up @@ -146,14 +149,6 @@
content => template("${module_name}/logrotate.erb"),
}

# Main service
service { 'httpd':
ensure => running,
enable => true,
restart => $service_restart,
hasstatus => true,
require => Package['httpd'],
}
if $ssl {
package { 'mod_ssl':
ensure => installed,
Expand Down
19 changes: 19 additions & 0 deletions manifests/service.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Class: apache_httpd::service
#
# Apache httpd web server service class.
#
class apache_httpd::service (
$service_restart = $::apache_httpd::params::service_restart,
) {

include '::apache_httpd::install'

# Main service
service { 'httpd':
ensure => running,
enable => true,
restart => $service_restart,
hasstatus => true,
require => Package['httpd'],
}
}