File tree Expand file tree Collapse file tree 3 files changed +39
-41
lines changed Expand file tree Collapse file tree 3 files changed +39
-41
lines changed Original file line number Diff line number Diff line change 2366
2366
# - $suphp_engine
2367
2367
# - $shibboleth_enabled
2368
2368
if $_directories and ! empty($_directories) and $ensure == ' present' {
2369
+ $_directories.each |Hash $directory | {
2370
+ if ' auth_basic_authoritative' in $directory or ' auth_basic_fake' in $directory or ' auth_basic_provider' in $directory {
2371
+ include apache::mod::auth_basic
2372
+ }
2373
+
2374
+ if ' auth_user_file' in $directory {
2375
+ include apache::mod::authn_file
2376
+ }
2377
+
2378
+ if ' auth_group_file' in $directory {
2379
+ include apache::mod::authz_groupfile
2380
+ }
2381
+
2382
+ if ' gssapi' in $directory {
2383
+ include apache::mod::auth_gssapi
2384
+ }
2385
+
2386
+ if $directory [' provider' ] and $directory [' provider' ] =~ ' location' and (' proxy_pass' in $directory or ' proxy_pass_match' in $directory ) {
2387
+ include apache::mod::proxy_http
2388
+ }
2389
+
2390
+ if ' request_headers' in $directory {
2391
+ include apache::mod::headers
2392
+ }
2393
+
2394
+ if ' rewrites' in $directory {
2395
+ include apache::mod::rewrite
2396
+ }
2397
+
2398
+ if ' setenv' in $directory {
2399
+ include apache::mod::setenv
2400
+ }
2401
+ }
2402
+
2369
2403
concat::fragment { "${name}-directories" :
2370
2404
target => " ${priority_real}${filename} .conf" ,
2371
2405
order => 60,
Original file line number Diff line number Diff line change @@ -22,47 +22,6 @@ class { 'apache':
22
22
end
23
23
end
24
24
25
- unless os [ :family ] == 'sles' && os [ :release ] . to_i >= 12
26
- describe 'no default mods and failing' do
27
- before :all do
28
- pp = <<-PP
29
- include apache::params
30
- class { 'apache': default_mods => false, service_ensure => stopped, }
31
- PP
32
- apply_manifest ( pp )
33
- end
34
- # Using puppet_apply as a helper
35
- pp = <<-MANIFEST
36
- class { 'apache':
37
- default_mods => false,
38
- }
39
- apache::vhost { 'defaults.example.com':
40
- docroot => '#{ apache_hash [ 'doc_root' ] } /defaults',
41
- aliases => [
42
- {
43
- alias => '/css',
44
- path => '#{ apache_hash [ 'doc_root' ] } /css',
45
- },
46
- ],
47
- directories => [
48
- {
49
- 'path' => "#{ apache_hash [ 'doc_root' ] } /admin",
50
- 'auth_basic_fake' => 'demo demopass',
51
- }
52
- ],
53
- setenv => 'TEST1 one',
54
- }
55
- MANIFEST
56
- it 'applies with errors' do
57
- apply_manifest ( pp , expect_failures : true )
58
- end
59
- end
60
-
61
- describe service ( apache_hash [ 'service_name' ] ) do
62
- it { is_expected . not_to be_running }
63
- end
64
- end
65
-
66
25
describe 'alternative default mods' do
67
26
# Using puppet_apply as a helper
68
27
let ( :pp ) do
Original file line number Diff line number Diff line change 577
577
'mode' => '0600' )
578
578
}
579
579
it { is_expected . to contain_class ( 'apache::mod::alias' ) }
580
+ it { is_expected . to contain_class ( 'apache::mod::auth_basic' ) }
581
+ it { is_expected . to contain_class ( 'apache::mod::authn_file' ) }
582
+ it { is_expected . to contain_class ( 'apache::mod::authz_groupfile' ) }
583
+ it { is_expected . to contain_class ( 'apache::mod::auth_gssapi' ) }
580
584
it { is_expected . to contain_class ( 'apache::mod::env' ) }
581
585
it { is_expected . to contain_class ( 'apache::mod::fastcgi' ) }
582
586
it { is_expected . to contain_class ( 'apache::mod::filter' ) }
586
590
it { is_expected . to contain_class ( 'apache::mod::proxy' ) }
587
591
it { is_expected . to contain_class ( 'apache::mod::proxy_http' ) }
588
592
it { is_expected . to contain_class ( 'apache::mod::rewrite' ) }
593
+ it { is_expected . to contain_class ( 'apache::mod::setenv' ) }
589
594
it { is_expected . to contain_class ( 'apache::mod::setenvif' ) }
590
595
it { is_expected . to contain_class ( 'apache::mod::suexec' ) }
591
596
it { is_expected . to contain_class ( 'apache::mod::vhost_alias' ) }
You can’t perform that action at this time.
0 commit comments