Skip to content

Commit 2ca3ea9

Browse files
committed
Merge pull request puppetlabs#1235 from abednarik/fix/master/default_docroot_update_debian
(MODULES-2651) Default document root update for Ubuntu 14.04 and Debian 8
2 parents 08ead35 + 6fde679 commit 2ca3ea9

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ class { 'apache':
917917

918918
Sets the default [`DocumentRoot`][] location. Default: Determined by your operating system.
919919

920-
- **Debian**: `/var/www`
920+
- **Debian**: `/var/www/html`
921921
- **FreeBSD**: `/usr/local/www/apache22/data`
922922
- **Gentoo**: `/var/www/localhost/htdocs`
923923
- **Red Hat**: `/var/www/html`

manifests/params.pp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@
223223
$fastcgi_lib_path = '/var/lib/apache2/fastcgi'
224224
$mime_support_package = 'mime-support'
225225
$mime_types_config = '/etc/mime.types'
226-
$docroot = '/var/www'
226+
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
227+
$docroot = '/var/www/html'
228+
} else {
229+
$docroot = '/var/www'
230+
}
227231
$cas_cookie_path = '/var/cache/apache2/mod_auth_cas/'
228232
$mellon_lock_file = undef
229233
$mellon_cache_size = undef

spec/classes/apache_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,37 @@
235235
end
236236
end
237237

238+
context "8" do
239+
let :facts do
240+
super().merge({
241+
:lsbdistcodename => 'jessie',
242+
:operatingsystemrelease => '8'
243+
})
244+
end
245+
it { is_expected.to contain_file("/var/www/html").with(
246+
'ensure' => 'directory'
247+
)
248+
}
249+
end
238250
context "on Ubuntu" do
239251
let :facts do
240252
super().merge({
241253
:operatingsystem => 'Ubuntu'
242254
})
243255
end
244256

257+
context "14.04" do
258+
let :facts do
259+
super().merge({
260+
:lsbdistrelease => '14.04',
261+
:operatingsystemrelease => '14.04'
262+
})
263+
end
264+
it { is_expected.to contain_file("/var/www/html").with(
265+
'ensure' => 'directory'
266+
)
267+
}
268+
end
245269
context "13.10" do
246270
let :facts do
247271
super().merge({

0 commit comments

Comments
 (0)