Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Automatically enable mod_http2 if needed
Following https://httpd.apache.org/docs/current/howto/http2.html the
first step is to load the http2 module. By inspecting the protocols
argument users can enable HTTP/2 via Hiera.
  • Loading branch information
ekohl committed Oct 13, 2022
commit 6fa784a66061551e844203f17ad9367f7ad41d4b
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,10 @@
include "::apache::mod::${mpm_module}"
}

if 'h2' in $protocols or 'h2c' in $protocols {
include apache::mod::http2
}

$default_vhost_ensure = $default_vhost ? {
true => 'present',
false => 'absent'
Expand Down
2 changes: 1 addition & 1 deletion manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@
}
}

if ($h2_copy_files != undef or $h2_direct != undef or $h2_early_hints != undef or $h2_max_session_streams != undef or $h2_modern_tls_only != undef or $h2_push != undef or $h2_push_diary_size != undef or $h2_push_priority != [] or $h2_push_resource != [] or $h2_serialize_headers != undef or $h2_stream_max_mem_size != undef or $h2_tls_cool_down_secs != undef or $h2_tls_warm_up_size != undef or $h2_upgrade != undef or $h2_window_size != undef) and $ensure == 'present' {
if ('h2' in $protocols or 'h2c' in $protocols or $h2_copy_files != undef or $h2_direct != undef or $h2_early_hints != undef or $h2_max_session_streams != undef or $h2_modern_tls_only != undef or $h2_push != undef or $h2_push_diary_size != undef or $h2_push_priority != [] or $h2_push_resource != [] or $h2_serialize_headers != undef or $h2_stream_max_mem_size != undef or $h2_tls_cool_down_secs != undef or $h2_tls_warm_up_size != undef or $h2_upgrade != undef or $h2_window_size != undef) and $ensure == 'present' {
include apache::mod::http2

concat::fragment { "${name}-http2":
Expand Down