diff --git a/manifests/mod/dav_svn.pp b/manifests/mod/dav_svn.pp index c46976e85..36af06fa4 100644 --- a/manifests/mod/dav_svn.pp +++ b/manifests/mod/dav_svn.pp @@ -1,17 +1,20 @@ class apache::mod::dav_svn ( $authz_svn_enabled = false, ) { - Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn'] - include ::apache::mod::dav - ::apache::mod { 'dav_svn': } + Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn'] + include ::apache::mod::dav + ::apache::mod { 'dav_svn': } - if $authz_svn_enabled { - ::apache::mod { 'authz_svn': - loadfile_name => $::osfamily ? { - 'Debian' => undef, - default => 'dav_svn_authz_svn.load', - }, - require => Apache::Mod['dav_svn'], - } + if $::osfamily == 'Debian' and $::operatingsystemmajrelease != '6' { + $loadfile_name = undef + } else { + $loadfile_name = 'dav_svn_authz_svn.load' + } + + if $authz_svn_enabled { + ::apache::mod { 'authz_svn': + loadfile_name => $loadfile_name, + require => Apache::Mod['dav_svn'], } + } } diff --git a/spec/acceptance/mod_dav_svn_spec.rb b/spec/acceptance/mod_dav_svn_spec.rb index 5125ada0b..90e0db563 100644 --- a/spec/acceptance/mod_dav_svn_spec.rb +++ b/spec/acceptance/mod_dav_svn_spec.rb @@ -5,7 +5,11 @@ when 'Debian' mod_dir = '/etc/apache2/mods-available' service_name = 'apache2' - authz_svn_load_file = 'authz_svn.load' + if fact('operatingsystemmajrelease') == '6' + authz_svn_load_file = 'dav_svn_authz_svn.load' + else + authz_svn_load_file = 'authz_svn.load' + end when 'RedHat' mod_dir = '/etc/httpd/conf.d' service_name = 'httpd'