Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Fix apache::listen for debian8 #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
24 changes: 10 additions & 14 deletions manifests/listen.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,28 @@
# (it creates a NameVirtualHost <%= @namevirtualhost %>:<%= @port %> entry)
# Set to false to listen to the port without a NameVirtualHost
#
# [*enable*]
# Set to false to disable the listen configuration.
# Work only on Debian 8 and Ubuntu 14
#
# == Examples
#
# apache::listen { '8080':}
#
define apache::listen (
$enable = true,
$namevirtualhost = '*',
$ensure = 'present',
$template = 'apache/listen.conf.erb',
$notify_service = true ) {
$notify_service = true
) {

include apache

$manage_service_autorestart = $notify_service ? {
true => 'Service[apache]',
false => undef,
}

file { "Apache_Listen_${name}.conf":
apache::dotconf { "0000_listen_${name}":
ensure => $ensure,
path => "${apache::config_dir}/conf.d/0000_listen_${name}.conf",
mode => $apache::config_file_mode,
owner => $apache::config_file_owner,
group => $apache::config_file_group,
require => Package['apache'],
notify => $manage_service_autorestart,
enable => $enable,
content => template($template),
audit => $apache::manage_audit,
}

}