From 88dd268c4ac0536c052952b33d64cc0c6bf9395c Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Fri, 30 Jan 2015 14:47:54 +0000 Subject: [PATCH] Add connection-tuning file to new Apache 2.4 conf folder structure This change enables this manifest on Ubuntu Trusty, as it comes with Apache 2.4 by default and there's no longer conf.d folder, it is split on conf.available/conf.enable. Change-Id: I7986e3f3be97f3448b743789a2c4fdacd07a20a8 --- manifests/apache.pp | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/manifests/apache.pp b/manifests/apache.pp index 95558ab..7fe10d6 100644 --- a/manifests/apache.pp +++ b/manifests/apache.pp @@ -32,13 +32,31 @@ class etherpad_lite::apache ( a2mod { 'proxy_http': ensure => present, } - file { '/etc/apache2/conf.d/connection-tuning': - ensure => present, - owner => 'root', - group => 'root', - mode => '0644', - source => 'puppet:///modules/etherpad_lite/apache-connection-tuning', - notify => Service['httpd'], + + if ($::lsbdistcodename == 'precise') { + file { '/etc/apache2/conf.d/connection-tuning': + ensure => present, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/etherpad_lite/apache-connection-tuning', + notify => Service['httpd'], + } + } else { + file { '/etc/apache2/conf-available/connection-tuning': + ensure => present, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/etherpad_lite/apache-connection-tuning', + } + + file { '/etc/apache2/conf-enabled/connection-tuning': + ensure => link, + target => '/etc/apache2/conf-available/connection-tuning', + notify => Service['httpd'], + require => File['/etc/apache2/conf-available/connection-tuning'], + } } file { '/etc/ssl/certs':