Mercurial > repos > other > Puppet
comparison modules/apache/manifests/mod/http2.pp @ 275:d9352a684e62
Mass update of modules to remove deprecation warnings
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Jan 2020 11:36:07 +0000 |
parents | |
children | b8d6ada284dd |
comparison
equal
deleted
inserted
replaced
274:b2571c28fc27 | 275:d9352a684e62 |
---|---|
1 # @summary | |
2 # Installs and configures `mod_http2`. | |
3 # | |
4 # @param h2_copy_files | |
5 # Determine file handling in responses. | |
6 # | |
7 # @param h2_direct | |
8 # H2 Direct Protocol Switch. | |
9 # | |
10 # @param h2_early_hints | |
11 # Determine sending of 103 status codes. | |
12 # | |
13 # @param h2_max_session_streams | |
14 # Sets maximum number of active streams per HTTP/2 session. | |
15 # | |
16 # @param h2_max_worker_idle_seconds | |
17 # Sets maximum number of seconds h2 workers remain idle until shut down. | |
18 # | |
19 # @param h2_max_workers | |
20 # Sets maximum number of worker threads to use per child process. | |
21 # | |
22 # @param h2_min_workers | |
23 # Sets minimal number of worker threads to use per child process. | |
24 # | |
25 # @param h2_modern_tls_only | |
26 # Toggles the security checks on HTTP/2 connections in TLS mode | |
27 # | |
28 # @param h2_push | |
29 # Toggles the usage of the HTTP/2 server push protocol feature. | |
30 # | |
31 # @param h2_push_diary_size | |
32 # Sets maximum number of HTTP/2 server pushes that are remembered per HTTP/2 connection. | |
33 # | |
34 # @param h2_priority | |
35 # Require HTTP/2 connections to be "modern TLS" only | |
36 # | |
37 # @param h2_push_resource | |
38 # When added to a directory/location, HTTP/2 PUSHes will be attempted for all paths added | |
39 # via this directive | |
40 # | |
41 # @param h2_serialize_headers | |
42 # Toggles if HTTP/2 requests shall be serialized in HTTP/1.1 format for processing by httpd | |
43 # core or if received binary data shall be passed into the request_recs directly. | |
44 # | |
45 # @param h2_stream_max_mem_size | |
46 # Sets the maximum number of outgoing data bytes buffered in memory for an active streams. | |
47 # | |
48 # @param h2_tls_cool_down_secs | |
49 # Sets the number of seconds of idle time on a TLS connection before the TLS write size falls | |
50 # back to small (~1300 bytes) length. | |
51 # | |
52 # @param h2_tls_warm_up_size | |
53 # Sets the number of bytes to be sent in small TLS records (~1300 bytes) until doing maximum | |
54 # sized writes (16k) on https: HTTP/2 connections. | |
55 # | |
56 # @param h2_upgrade | |
57 # Toggles the usage of the HTTP/1.1 Upgrade method for switching to HTTP/2. | |
58 # | |
59 # @param h2_window_size | |
60 # Sets the size of the window that is used for flow control from client to server and limits | |
61 # the amount of data the server has to buffer. | |
62 # | |
63 # @param apache_version | |
64 # Version of Apache to install module on. | |
65 # | |
66 # @see https://httpd.apache.org/docs/current/mod/mod_http2.html for additional documentation. | |
67 # | |
68 class apache::mod::http2 ( | |
69 Optional[Boolean] $h2_copy_files = undef, | |
70 Optional[Boolean] $h2_direct = undef, | |
71 Optional[Boolean] $h2_early_hints = undef, | |
72 Optional[Integer] $h2_max_session_streams = undef, | |
73 Optional[Integer] $h2_max_worker_idle_seconds = undef, | |
74 Optional[Integer] $h2_max_workers = undef, | |
75 Optional[Integer] $h2_min_workers = undef, | |
76 Optional[Boolean] $h2_modern_tls_only = undef, | |
77 Optional[Boolean] $h2_push = undef, | |
78 Optional[Integer] $h2_push_diary_size = undef, | |
79 Array[String] $h2_push_priority = [], | |
80 Array[String] $h2_push_resource = [], | |
81 Optional[Boolean] $h2_serialize_headers = undef, | |
82 Optional[Integer] $h2_stream_max_mem_size = undef, | |
83 Optional[Integer] $h2_tls_cool_down_secs = undef, | |
84 Optional[Integer] $h2_tls_warm_up_size = undef, | |
85 Optional[Boolean] $h2_upgrade = undef, | |
86 Optional[Integer] $h2_window_size = undef, | |
87 Optional[String] $apache_version = undef, | |
88 ) { | |
89 include ::apache | |
90 apache::mod { 'http2': } | |
91 | |
92 $_apache_version = pick($apache_version, $apache::apache_version) | |
93 | |
94 file { 'http2.conf': | |
95 ensure => file, | |
96 content => template('apache/mod/http2.conf.erb'), | |
97 mode => $::apache::file_mode, | |
98 path => "${::apache::mod_dir}/http2.conf", | |
99 owner => $::apache::params::user, | |
100 group => $::apache::params::group, | |
101 require => Exec["mkdir ${::apache::mod_dir}"], | |
102 before => File[$::apache::mod_dir], | |
103 notify => Class['apache::service'], | |
104 } | |
105 } |