File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 23572357 include apache::mod::auth_gssapi
23582358 }
23592359
2360+ if ' index_options' in $directory or ' index_order_default' in $directory or ' index_style_sheet' in $directory {
2361+ include apache::mod::autoindex
2362+ }
2363+
23602364 if $directory [' provider' ] and $directory [' provider' ] =~ ' location' and (' proxy_pass' in $directory or ' proxy_pass_match' in $directory ) {
23612365 include apache::mod::proxy_http
23622366
Original file line number Diff line number Diff line change 22582258 it { is_expected . to contain_class ( 'apache::mod::dav' ) }
22592259 it { is_expected . to contain_class ( 'apache::mod::dav_svn' ) }
22602260 end
2261+
2262+ context 'mod_autoindex is included when needed' do
2263+ let :params do
2264+ {
2265+ 'docroot' => '/var/www/foo' ,
2266+ 'directories' => [
2267+ {
2268+ 'index_options' => [ 'FancyIndexing' ] ,
2269+ } ,
2270+ ]
2271+
2272+ }
2273+ end
2274+
2275+ it { is_expected . to compile }
2276+ it { is_expected . to contain_class ( 'apache::mod::autoindex' ) }
2277+ end
22612278 end
22622279 end
22632280 end
You can’t perform that action at this time.
0 commit comments