comparison modules/apache/manifests/mod/passenger.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 675c1cc61eaf
children b8d6ada284dd
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
1 # @summary
2 # Installs `mod_pasenger`.
3 #
4 # @param manage_repo
5 # Toggle whether to manage yum repo if on a RedHat node.
6 #
7 # @param mod_id
8 # Specifies the package id.
9 #
10 # @param mod_lib
11 # Defines the module's shared object name. Do not configure manually without special reason.
12 #
13 # @param mod_lib_path
14 # Specifies a path to the module's libraries. Do not manually set this parameter without special reason. The `path` parameter overrides
15 # this value.
16 #
17 # @param mod_package
18 # Name of the module package to install.
19 #
20 # @param mod_package_ensure
21 # Determines whether Puppet ensures the module should be installed.
22 #
23 # @param mod_path
24 # Specifies a path to the module. Do not manually set this parameter without a special reason.
25 #
26 # @param passenger_allow_encoded_slashes
27 # Toggle whether URLs with encoded slashes (%2f) can be used (by default Apache does not support this).
28 #
29 # @param passenger_app_env
30 # This option sets, for the current application, the value of the following environment variables:
31 # - RAILS_ENV
32 # - RACK_ENV
33 # - WSGI_ENV
34 # - NODE_ENV
35 # - PASSENGER_APP_ENV
36 #
37 # @param passenger_app_group_name
38 # Sets the name of the application group that the current application should belong to.
39 #
40 # @param passenger_app_root
41 # Path to the application root which allows access independent from the DocumentRoot.
42 #
43 # @param passenger_app_type
44 # Specifies the type of the application. If you set this option, then you must also set PassengerAppRoot, otherwise Passenger will
45 # not properly recognize your application.
46 #
47 # @param passenger_base_uri
48 # Used to specify that the given URI is an distinct application that should be served by Passenger.
49 #
50 # @param passenger_buffer_response
51 # Toggle whether application-generated responses are buffered by Apache. Buffering will happen in memory.
52 #
53 # @param passenger_buffer_upload
54 # Toggle whether HTTP client request bodies are buffered before they are sent to the application.
55 #
56 # @param passenger_concurrency_model
57 # Specifies the I/O concurrency model that should be used for Ruby application processes.
58 #
59 # @param passenger_conf_file
60 #
61 #
62 # @param passenger_conf_package_file
63 #
64 #
65 # @param passenger_data_buffer_dir
66 # Specifies the directory in which to store data buffers.
67 #
68 # @param passenger_debug_log_file
69 #
70 #
71 # @param passenger_debugger
72 # Turns support for Ruby application debugging on or off.
73 #
74 # @param passenger_default_group
75 # Allows you to specify the group that applications must run as, if user switching fails or is disabled.
76 #
77 # @param passenger_default_ruby
78 # File path to desired ruby interpreter to use by default.
79 #
80 # @param passenger_default_user
81 # Allows you to specify the user that applications must run as, if user switching fails or is disabled.
82 #
83 # @param passenger_disable_security_update_check
84 # Allows disabling the Passenger security update check, a daily check with https://securitycheck.phusionpassenger.com for important
85 # security updates that might be available.
86 #
87 # @param passenger_enabled
88 # Toggles whether Passenger should be enabled for that particular context.
89 #
90 # @param passenger_error_override
91 # Toggles whether Apache will intercept and handle responses with HTTP status codes of 400 and higher.
92 #
93 # @param passenger_file_descriptor_log_file
94 # Log file descriptor debug tracing messages to the given file.
95 #
96 # @param passenger_fly_with
97 # Enables the Flying Passenger mode, and configures Apache to connect to the Flying Passenger daemon that's listening on the
98 # given socket filename.
99 #
100 # @param passenger_force_max_concurrent_requests_per_process
101 # Use this option to tell Passenger how many concurrent requests the application can handle per process.
102 #
103 # @param passenger_friendly_error_pages
104 # Toggles whether Passenger should display friendly error pages whenever an application fails to start.
105 #
106 # @param passenger_group
107 # Allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of the
108 # startup file.
109 #
110 # @param passenger_high_performance
111 # Toggles whether to enable PassengerHighPerformance which will make Passenger will be a little faster, in return for reduced
112 # compatibility with other Apache modules.
113 #
114 # @param passenger_installed_version
115 #
116 #
117 # @param passenger_instance_registry_dir
118 # Specifies the directory that Passenger should use for registering its current instance.
119 #
120 # @param passenger_load_shell_envvars
121 # Enables or disables the loading of shell environment variables before spawning the application.
122 #
123 # @param passenger_log_file
124 # File path to log file. By default Passenger log messages are written to the Apache global error log.
125 #
126 # @param passenger_log_level
127 # Specifies how much information Passenger should log to its log file. A higher log level value means that more
128 # information will be logged.
129 #
130 # @param passenger_lve_min_uid
131 # When using Passenger on a LVE-enabled kernel, a security check (enter) is run for spawning application processes. This options
132 # tells the check to only allow processes with UIDs equal to, or higher than, the specified value.
133 #
134 # @param passenger_max_instances
135 # The maximum number of application processes that may simultaneously exist for an application.
136 #
137 # @param passenger_max_instances_per_app
138 # The maximum number of application processes that may simultaneously exist for a single application.
139 #
140 # @param passenger_max_pool_size
141 # The maximum number of application processes that may simultaneously exist.
142 #
143 # @param passenger_max_preloader_idle_time
144 # Set the preloader's idle timeout, in seconds. A value of 0 means that it should never idle timeout.
145 #
146 # @param passenger_max_request_queue_size
147 # Specifies the maximum size for the queue of all incoming requests.
148 #
149 # @param passenger_max_request_time
150 # The maximum amount of time, in seconds, that an application process may take to process a request.
151 #
152 # @param passenger_max_requests
153 # The maximum number of requests an application process will process.
154 #
155 # @param passenger_memory_limit
156 # The maximum amount of memory that an application process may use, in megabytes.
157 #
158 # @param passenger_meteor_app_settings
159 # When using a Meteor application in non-bundled mode, use this option to specify a JSON file with settings for the application.
160 #
161 # @param passenger_min_instances
162 # Specifies the minimum number of application processes that should exist for a given application.
163 #
164 # @param passenger_nodejs
165 # Specifies the Node.js command to use for serving Node.js web applications.
166 #
167 # @param passenger_pool_idle_time
168 # The maximum number of seconds that an application process may be idle.
169 #
170 # @param passenger_pre_start
171 # URL of the web application you want to pre-start.
172 #
173 # @param passenger_python
174 # Specifies the Python interpreter to use for serving Python web applications.
175 #
176 # @param passenger_resist_deployment_errors
177 # Enables or disables resistance against deployment errors.
178 #
179 # @param passenger_resolve_symlinks_in_document_root
180 # This option is no longer available in version 5.2.0. Switch to PassengerAppRoot if you are setting the application root via a
181 # document root containing symlinks.
182 #
183 # @param passenger_response_buffer_high_watermark
184 # Configures the maximum size of the real-time disk-backed response buffering system.
185 #
186 # @param passenger_restart_dir
187 # Path to directory containing restart.txt file. Can be either absolute or relative.
188 #
189 # @param passenger_rolling_restarts
190 # Enables or disables support for zero-downtime application restarts through restart.txt.
191 #
192 # @param passenger_root
193 # Refers to the location to the Passenger root directory, or to a location configuration file.
194 #
195 # @param passenger_ruby
196 # Specifies the Ruby interpreter to use for serving Ruby web applications.
197 #
198 # @param passenger_security_update_check_proxy
199 # Allows use of an intermediate proxy for the Passenger security update check.
200 #
201 # @param passenger_show_version_in_header
202 # Toggle whether Passenger will output its version number in the X-Powered-By header in all Passenger-served requests:
203 #
204 # @param passenger_socket_backlog
205 # This option can be raised if Apache manages to overflow the backlog queue.
206 #
207 # @param passenger_spawn_method
208 # Controls whether Passenger spawns applications directly, or using a prefork copy-on-write mechanism.
209 #
210 # @param passenger_start_timeout
211 # Specifies a timeout for the startup of application processes.
212 #
213 # @param passenger_startup_file
214 # Specifies the startup file that Passenger should use when loading the application.
215 #
216 # @param passenger_stat_throttle_rate
217 # Setting this option to a value of x means that certain filesystem checks will be performed at most once every x seconds.
218 #
219 # @param passenger_sticky_sessions
220 # Toggles whether all requests that a client sends will be routed to the same originating application process, whenever possible.
221 #
222 # @param passenger_sticky_sessions_cookie_name
223 # Sets the name of the sticky sessions cookie.
224 #
225 # @param passenger_thread_count
226 # Specifies the number of threads that Passenger should spawn per Ruby application process.
227 #
228 # @param passenger_use_global_queue
229 # N/A.
230 #
231 # @param passenger_user
232 # Allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of the
233 # startup file.
234 #
235 # @param passenger_user_switching
236 # Toggles whether to attempt to enable user account sandboxing, also known as user switching.
237 #
238 # @param rack_auto_detect
239 # This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.
240 #
241 # @param rack_autodetect
242 # This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.
243 #
244 # @param rack_base_uri
245 # Deprecated in 3.0.0 in favor of PassengerBaseURI.
246 #
247 # @param rack_env
248 # Alias for PassengerAppEnv.
249 #
250 # @param rails_allow_mod_rewrite
251 # This option doesn't do anything anymore since version 4.0.0.
252 #
253 # @param rails_app_spawner_idle_time
254 # This option has been removed in version 4.0.0, and replaced with PassengerMaxPreloaderIdleTime.
255 #
256 # @param rails_auto_detect
257 # This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.
258 #
259 # @param rails_autodetect
260 # This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.
261 #
262 # @param rails_base_uri
263 # Deprecated in 3.0.0 in favor of PassengerBaseURI.
264 #
265 # @param rails_default_user
266 # Deprecated in 3.0.0 in favor of PassengerDefaultUser
267 #
268 # @param rails_env
269 # Alias for PassengerAppEnv.
270 #
271 # @param rails_framework_spawner_idle_time
272 # This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed
273 # altogether. You should use smart spawning instead.
274 #
275 # @param rails_ruby
276 # Deprecated in 3.0.0 in favor of PassengerRuby.
277 #
278 # @param rails_spawn_method
279 # Deprecated in 3.0.0 in favor of PassengerSpawnMethod.
280 #
281 # @param rails_user_switching
282 # Deprecated in 3.0.0 in favor of PassengerUserSwitching.
283 #
284 # @param wsgi_auto_detect
285 # This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.
286 #
287 # @note
288 # In Passenger source code you can strip out what are all the available options by looking in
289 # - src/apache2_module/Configuration.cpp
290 # - src/apache2_module/ConfigurationCommands.cpp
291 # There are also several undocumented settings.
292 #
293 # @note
294 # For Red Hat based systems, ensure that you meet the minimum requirements described in the passenger docs.
295 #
296 # The current set of server configurations settings were taken directly from the Passenger Reference. To enable deprecation warnings
297 # and removal failure messages, set the passenger_installed_version to the version number installed on the server.
298 #
299 # Change Log:
300 # - As of 08/13/2017 there are 84 available/deprecated/removed settings.
301 # - Around 08/20/2017 UnionStation was discontinued options were removed.
302 # - As of 08/20/2017 there are 77 available/deprecated/removed settings.
303 #
304 # @see https://www.phusionpassenger.com/library/config/apache/reference/ for additional documentation.
305 #
1 class apache::mod::passenger ( 306 class apache::mod::passenger (
2 $passenger_conf_file = $::apache::params::passenger_conf_file, 307 $manage_repo = true,
3 $passenger_conf_package_file = $::apache::params::passenger_conf_package_file, 308 $mod_id = undef,
4 $passenger_high_performance = undef, 309 $mod_lib = undef,
5 $passenger_pool_idle_time = undef, 310 $mod_lib_path = undef,
6 $passenger_max_request_queue_size = undef, 311 $mod_package = undef,
7 $passenger_max_requests = undef, 312 $mod_package_ensure = undef,
8 $passenger_spawn_method = undef, 313 $mod_path = undef,
9 $passenger_stat_throttle_rate = undef, 314 $passenger_allow_encoded_slashes = undef,
10 $rack_autodetect = undef, 315 $passenger_app_env = undef,
11 $rails_autodetect = undef, 316 $passenger_app_group_name = undef,
12 $passenger_root = $::apache::params::passenger_root, 317 $passenger_app_root = undef,
13 $passenger_ruby = $::apache::params::passenger_ruby, 318 $passenger_app_type = undef,
14 $passenger_default_ruby = $::apache::params::passenger_default_ruby, 319 $passenger_base_uri = undef,
15 $passenger_max_pool_size = undef, 320 $passenger_buffer_response = undef,
16 $passenger_min_instances = undef, 321 $passenger_buffer_upload = undef,
17 $passenger_max_instances_per_app = undef, 322 $passenger_concurrency_model = undef,
18 $passenger_use_global_queue = undef, 323 $passenger_conf_file = $::apache::params::passenger_conf_file,
19 $passenger_app_env = undef, 324 $passenger_conf_package_file = $::apache::params::passenger_conf_package_file,
20 $passenger_log_file = undef, 325 $passenger_data_buffer_dir = undef,
21 $passenger_log_level = undef, 326 $passenger_debug_log_file = undef,
22 $passenger_data_buffer_dir = undef, 327 $passenger_debugger = undef,
23 $manage_repo = true, 328 $passenger_default_group = undef,
24 $mod_package = undef, 329 $passenger_default_ruby = $::apache::params::passenger_default_ruby,
25 $mod_package_ensure = undef, 330 $passenger_default_user = undef,
26 $mod_lib = undef, 331 $passenger_disable_security_update_check = undef,
27 $mod_lib_path = undef, 332 $passenger_enabled = undef,
28 $mod_id = undef, 333 $passenger_error_override = undef,
29 $mod_path = undef, 334 $passenger_file_descriptor_log_file = undef,
335 $passenger_fly_with = undef,
336 $passenger_force_max_concurrent_requests_per_process = undef,
337 $passenger_friendly_error_pages = undef,
338 $passenger_group = undef,
339 $passenger_high_performance = undef,
340 $passenger_installed_version = undef,
341 $passenger_instance_registry_dir = undef,
342 $passenger_load_shell_envvars = undef,
343 Optional[Stdlib::Absolutepath] $passenger_log_file = undef,
344 $passenger_log_level = undef,
345 $passenger_lve_min_uid = undef,
346 $passenger_max_instances = undef,
347 $passenger_max_instances_per_app = undef,
348 $passenger_max_pool_size = undef,
349 $passenger_max_preloader_idle_time = undef,
350 $passenger_max_request_queue_size = undef,
351 $passenger_max_request_time = undef,
352 $passenger_max_requests = undef,
353 $passenger_memory_limit = undef,
354 $passenger_meteor_app_settings = undef,
355 $passenger_min_instances = undef,
356 $passenger_nodejs = undef,
357 $passenger_pool_idle_time = undef,
358 Optional[Variant[String,Array[String]]] $passenger_pre_start = undef,
359 $passenger_python = undef,
360 $passenger_resist_deployment_errors = undef,
361 $passenger_resolve_symlinks_in_document_root = undef,
362 $passenger_response_buffer_high_watermark = undef,
363 $passenger_restart_dir = undef,
364 $passenger_rolling_restarts = undef,
365 $passenger_root = $::apache::params::passenger_root,
366 $passenger_ruby = $::apache::params::passenger_ruby,
367 $passenger_security_update_check_proxy = undef,
368 $passenger_show_version_in_header = undef,
369 $passenger_socket_backlog = undef,
370 Optional[Enum['smart', 'direct', 'smart-lv2', 'conservative']] $passenger_spawn_method = undef,
371 $passenger_start_timeout = undef,
372 $passenger_startup_file = undef,
373 $passenger_stat_throttle_rate = undef,
374 $passenger_sticky_sessions = undef,
375 $passenger_sticky_sessions_cookie_name = undef,
376 $passenger_thread_count = undef,
377 $passenger_use_global_queue = undef,
378 $passenger_user = undef,
379 $passenger_user_switching = undef,
380 $rack_auto_detect = undef,
381 $rack_autodetect = undef,
382 $rack_base_uri = undef,
383 $rack_env = undef,
384 $rails_allow_mod_rewrite = undef,
385 $rails_app_spawner_idle_time = undef,
386 $rails_auto_detect = undef,
387 $rails_autodetect = undef,
388 $rails_base_uri = undef,
389 $rails_default_user = undef,
390 $rails_env = undef,
391 $rails_framework_spawner_idle_time = undef,
392 $rails_ruby = undef,
393 $rails_spawn_method = undef,
394 $rails_user_switching = undef,
395 $wsgi_auto_detect = undef,
30 ) inherits ::apache::params { 396 ) inherits ::apache::params {
31 include ::apache 397 include ::apache
32 if $passenger_spawn_method { 398 if $passenger_installed_version {
33 validate_re($passenger_spawn_method, '(^smart$|^direct$|^smart-lv2$|^conservative$)', "${passenger_spawn_method} is not permitted for passenger_spawn_method. Allowed values are 'smart', 'direct', 'smart-lv2', or 'conservative'.") 399 if $passenger_allow_encoded_slashes {
400 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
401 fail("Passenger config option :: passenger_allow_encoded_slashes is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
402 }
403 }
404 if $passenger_app_env {
405 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
406 fail("Passenger config option :: passenger_app_env is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
407 }
408 }
409 if $passenger_app_group_name {
410 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
411 fail("Passenger config option :: passenger_app_group_name is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
412 }
413 }
414 if $passenger_app_root {
415 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
416 fail("Passenger config option :: passenger_app_root is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
417 }
418 }
419 if $passenger_app_type {
420 if (versioncmp($passenger_installed_version, '4.0.25') < 0) {
421 fail("Passenger config option :: passenger_app_type is not introduced until version 4.0.25 :: ${passenger_installed_version} is the version reported")
422 }
423 }
424 if $passenger_base_uri {
425 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
426 fail("Passenger config option :: passenger_base_uri is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
427 }
428 }
429 if $passenger_buffer_response {
430 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
431 fail("Passenger config option :: passenger_buffer_response is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
432 }
433 }
434 if $passenger_buffer_upload {
435 if (versioncmp($passenger_installed_version, '4.0.26') < 0) {
436 fail("Passenger config option :: passenger_buffer_upload is not introduced until version 4.0.26 :: ${passenger_installed_version} is the version reported")
437 }
438 }
439 if $passenger_concurrency_model {
440 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
441 fail("Passenger config option :: passenger_concurrency_model is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
442 }
443 }
444 if $passenger_data_buffer_dir {
445 if (versioncmp($passenger_installed_version, '5.0.0') < 0) {
446 fail("Passenger config option :: passenger_data_buffer_dir is not introduced until version 5.0.0 :: ${passenger_installed_version} is the version reported")
447 }
448 }
449 if $passenger_debug_log_file {
450 if (versioncmp($passenger_installed_version, '5.0.5') > 0) {
451 warning('DEPRECATED PASSENGER OPTION :: passenger_debug_log_file :: This option has been renamed in version 5.0.5 to PassengerLogFile.')
452 }
453 }
454 if $passenger_debugger {
455 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
456 fail("Passenger config option :: passenger_debugger is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
457 }
458 }
459 if $passenger_default_group {
460 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
461 fail("Passenger config option :: passenger_default_group is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
462 }
463 }
464 if $passenger_default_ruby {
465 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
466 fail("Passenger config option :: passenger_default_ruby is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
467 }
468 }
469 if $passenger_default_user {
470 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
471 fail("Passenger config option :: passenger_default_user is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
472 }
473 }
474 if $passenger_disable_security_update_check {
475 if (versioncmp($passenger_installed_version, '5.1.0') < 0) {
476 fail("Passenger config option :: passenger_disable_security_update_check is not introduced until version 5.1.0 :: ${passenger_installed_version} is the version reported")
477 }
478 }
479 if $passenger_enabled {
480 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
481 fail("Passenger config option :: passenger_enabled is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
482 }
483 }
484 if $passenger_error_override {
485 if (versioncmp($passenger_installed_version, '4.0.24') < 0) {
486 fail("Passenger config option :: passenger_error_override is not introduced until version 4.0.24 :: ${passenger_installed_version} is the version reported")
487 }
488 }
489 if $passenger_file_descriptor_log_file {
490 if (versioncmp($passenger_installed_version, '5.0.5') < 0) {
491 fail("Passenger config option :: passenger_file_descriptor_log_file is not introduced until version 5.0.5 :: ${passenger_installed_version} is the version reported")
492 }
493 }
494 if $passenger_fly_with {
495 if (versioncmp($passenger_installed_version, '4.0.45') < 0) {
496 fail("Passenger config option :: passenger_fly_with is not introduced until version 4.0.45 :: ${passenger_installed_version} is the version reported")
497 }
498 }
499 if $passenger_force_max_concurrent_requests_per_process {
500 if (versioncmp($passenger_installed_version, '5.0.22') < 0) {
501 fail("Passenger config option :: passenger_force_max_concurrent_requests_per_process is not introduced until version 5.0.22 :: ${passenger_installed_version} is the version reported")
502 }
503 }
504 if $passenger_friendly_error_pages {
505 if (versioncmp($passenger_installed_version, '4.0.42') < 0) {
506 fail("Passenger config option :: passenger_friendly_error_pages is not introduced until version 4.0.42 :: ${passenger_installed_version} is the version reported")
507 }
508 }
509 if $passenger_group {
510 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
511 fail("Passenger config option :: passenger_group is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
512 }
513 }
514 if $passenger_high_performance {
515 if (versioncmp($passenger_installed_version, '2.0.0') < 0) {
516 fail("Passenger config option :: passenger_high_performance is not introduced until version 2.0.0 :: ${passenger_installed_version} is the version reported")
517 }
518 }
519 if $passenger_instance_registry_dir {
520 if (versioncmp($passenger_installed_version, '5.0.0') < 0) {
521 fail("Passenger config option :: passenger_instance_registry_dir is not introduced until version 5.0.0 :: ${passenger_installed_version} is the version reported")
522 }
523 }
524 if $passenger_load_shell_envvars {
525 if (versioncmp($passenger_installed_version, '4.0.20') < 0) {
526 fail("Passenger config option :: passenger_load_shell_envvars is not introduced until version 4.0.20 :: ${passenger_installed_version} is the version reported")
527 }
528 }
529 if $passenger_log_file {
530 if (versioncmp($passenger_installed_version, '5.0.5') < 0) {
531 fail("Passenger config option :: passenger_log_file is not introduced until version 5.0.5 :: ${passenger_installed_version} is the version reported")
532 }
533 }
534 if $passenger_log_level {
535 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
536 fail("Passenger config option :: passenger_log_level is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
537 }
538 }
539 if $passenger_lve_min_uid {
540 if (versioncmp($passenger_installed_version, '5.0.28') < 0) {
541 fail("Passenger config option :: passenger_lve_min_uid is not introduced until version 5.0.28 :: ${passenger_installed_version} is the version reported")
542 }
543 }
544 if $passenger_max_instances {
545 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
546 fail("Passenger config option :: passenger_max_instances is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
547 }
548 }
549 if $passenger_max_instances_per_app {
550 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
551 fail("Passenger config option :: passenger_max_instances_per_app is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
552 }
553 }
554 if $passenger_max_pool_size {
555 if (versioncmp($passenger_installed_version, '1.0.0') < 0) {
556 fail("Passenger config option :: passenger_max_pool_size is not introduced until version 1.0.0 :: ${passenger_installed_version} is the version reported")
557 }
558 }
559 if $passenger_max_preloader_idle_time {
560 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
561 fail("Passenger config option :: passenger_max_preloader_idle_time is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
562 }
563 }
564 if $passenger_max_request_queue_size {
565 if (versioncmp($passenger_installed_version, '4.0.15') < 0) {
566 fail("Passenger config option :: passenger_max_request_queue_size is not introduced until version 4.0.15 :: ${passenger_installed_version} is the version reported")
567 }
568 }
569 if $passenger_max_request_time {
570 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
571 fail("Passenger config option :: passenger_max_request_time is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
572 }
573 }
574 if $passenger_max_requests {
575 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
576 fail("Passenger config option :: passenger_max_requests is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
577 }
578 }
579 if $passenger_memory_limit {
580 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
581 fail("Passenger config option :: passenger_memory_limit is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
582 }
583 }
584 if $passenger_meteor_app_settings {
585 if (versioncmp($passenger_installed_version, '5.0.7') < 0) {
586 fail("Passenger config option :: passenger_meteor_app_settings is not introduced until version 5.0.7 :: ${passenger_installed_version} is the version reported")
587 }
588 }
589 if $passenger_min_instances {
590 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
591 fail("Passenger config option :: passenger_min_instances is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
592 }
593 }
594 if $passenger_nodejs {
595 if (versioncmp($passenger_installed_version, '4.0.24') < 0) {
596 fail("Passenger config option :: passenger_nodejs is not introduced until version 4.0.24 :: ${passenger_installed_version} is the version reported")
597 }
598 }
599 if $passenger_pool_idle_time {
600 if (versioncmp($passenger_installed_version, '1.0.0') < 0) {
601 fail("Passenger config option :: passenger_pool_idle_time is not introduced until version 1.0.0 :: ${passenger_installed_version} is the version reported")
602 }
603 }
604 if $passenger_pre_start {
605 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
606 fail("Passenger config option :: passenger_pre_start is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
607 }
608 }
609 if $passenger_python {
610 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
611 fail("Passenger config option :: passenger_python is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
612 }
613 }
614 if $passenger_resist_deployment_errors {
615 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
616 fail("Passenger config option :: passenger_resist_deployment_errors is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
617 }
618 }
619 if $passenger_resolve_symlinks_in_document_root {
620 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
621 fail("Passenger config option :: passenger_resolve_symlinks_in_document_root is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
622 }
623 }
624 if $passenger_response_buffer_high_watermark {
625 if (versioncmp($passenger_installed_version, '5.0.0') < 0) {
626 fail("Passenger config option :: passenger_response_buffer_high_watermark is not introduced until version 5.0.0 :: ${passenger_installed_version} is the version reported")
627 }
628 }
629 if $passenger_restart_dir {
630 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
631 fail("Passenger config option :: passenger_restart_dir is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
632 }
633 }
634 if $passenger_rolling_restarts {
635 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
636 fail("Passenger config option :: passenger_rolling_restarts is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
637 }
638 }
639 if $passenger_root {
640 if (versioncmp($passenger_installed_version, '1.0.0') < 0) {
641 fail("Passenger config option :: passenger_root is not introduced until version 1.0.0 :: ${passenger_installed_version} is the version reported")
642 }
643 }
644 if $passenger_ruby {
645 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
646 fail("Passenger config option :: passenger_ruby is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
647 }
648 }
649 if $passenger_security_update_check_proxy {
650 if (versioncmp($passenger_installed_version, '5.1.0') < 0) {
651 fail("Passenger config option :: passenger_security_update_check_proxy is not introduced until version 5.1.0 :: ${passenger_installed_version} is the version reported")
652 }
653 }
654 if $passenger_show_version_in_header {
655 if (versioncmp($passenger_installed_version, '5.1.0') < 0) {
656 fail("Passenger config option :: passenger_show_version_in_header is not introduced until version 5.1.0 :: ${passenger_installed_version} is the version reported")
657 }
658 }
659 if $passenger_socket_backlog {
660 if (versioncmp($passenger_installed_version, '5.0.24') < 0) {
661 fail("Passenger config option :: passenger_socket_backlog is not introduced until version 5.0.24 :: ${passenger_installed_version} is the version reported")
662 }
663 }
664 if $passenger_spawn_method {
665 if (versioncmp($passenger_installed_version, '2.0.0') < 0) {
666 fail("Passenger config option :: passenger_spawn_method is not introduced until version 2.0.0 :: ${passenger_installed_version} is the version reported")
667 }
668 }
669 if $passenger_start_timeout {
670 if (versioncmp($passenger_installed_version, '4.0.15') < 0) {
671 fail("Passenger config option :: passenger_start_timeout is not introduced until version 4.0.15 :: ${passenger_installed_version} is the version reported")
672 }
673 }
674 if $passenger_startup_file {
675 if (versioncmp($passenger_installed_version, '4.0.25') < 0) {
676 fail("Passenger config option :: passenger_startup_file is not introduced until version 4.0.25 :: ${passenger_installed_version} is the version reported")
677 }
678 }
679 if $passenger_stat_throttle_rate {
680 if (versioncmp($passenger_installed_version, '2.2.0') < 0) {
681 fail("Passenger config option :: passenger_stat_throttle_rate is not introduced until version 2.2.0 :: ${passenger_installed_version} is the version reported")
682 }
683 }
684 if $passenger_sticky_sessions {
685 if (versioncmp($passenger_installed_version, '4.0.45') < 0) {
686 fail("Passenger config option :: passenger_sticky_sessions is not introduced until version 4.0.45 :: ${passenger_installed_version} is the version reported")
687 }
688 }
689 if $passenger_sticky_sessions_cookie_name {
690 if (versioncmp($passenger_installed_version, '4.0.45') < 0) {
691 fail("Passenger config option :: passenger_sticky_sessions_cookie_name is not introduced until version 4.0.45 :: ${passenger_installed_version} is the version reported")
692 }
693 }
694 if $passenger_thread_count {
695 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
696 fail("Passenger config option :: passenger_thread_count is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
697 }
698 }
699 if $passenger_use_global_queue {
700 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
701 fail('REMOVED PASSENGER OPTION :: passenger_use_global_queue :: -- no message on the current passenger reference webpage -- ')
702 }
703 if (versioncmp($passenger_installed_version, '2.0.4') < 0) {
704 fail("Passenger config option :: passenger_use_global_queue is not introduced until version 2.0.4 :: ${passenger_installed_version} is the version reported")
705 }
706 }
707 if $passenger_user {
708 if (versioncmp($passenger_installed_version, '4.0.0') < 0) {
709 fail("Passenger config option :: passenger_user is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported")
710 }
711 }
712 if $passenger_user_switching {
713 if (versioncmp($passenger_installed_version, '3.0.0') < 0) {
714 fail("Passenger config option :: passenger_user_switching is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported")
715 }
716 }
717 if ($rack_auto_detect or $rack_autodetect) {
718 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
719 fail('REMOVED PASSENGER OPTION :: rack_auto_detect :: These options have been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.')
720 }
721 }
722 if $rack_base_uri {
723 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
724 warning('DEPRECATED PASSENGER OPTION :: rack_base_uri :: Deprecated in 3.0.0 in favor of PassengerBaseURI.')
725 }
726 }
727 if $rack_env {
728 if (versioncmp($passenger_installed_version, '2.0.0') < 0) {
729 fail("Passenger config option :: rack_env is not introduced until version 2.0.0 :: ${passenger_installed_version} is the version reported")
730 }
731 }
732 if $rails_allow_mod_rewrite {
733 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
734 warning("DEPRECATED PASSENGER OPTION :: rails_allow_mod_rewrite :: This option doesn't do anything anymore in since version 4.0.0.")
735 }
736 }
737 if $rails_app_spawner_idle_time {
738 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
739 fail('REMOVED PASSENGER OPTION :: rails_app_spawner_idle_time :: This option has been removed in version 4.0.0, and replaced with PassengerMaxPreloaderIdleTime.')
740 }
741 }
742 if ($rails_auto_detect or $rails_autodetect) {
743 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
744 fail('REMOVED PASSENGER OPTION :: rails_auto_detect :: These options have been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.')
745 }
746 }
747 if $rails_base_uri {
748 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
749 warning('DEPRECATED PASSENGER OPTION :: rails_base_uri :: Deprecated in 3.0.0 in favor of PassengerBaseURI.')
750 }
751 }
752 if $rails_default_user {
753 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
754 warning('DEPRECATED PASSENGER OPTION :: rails_default_user :: Deprecated in 3.0.0 in favor of PassengerDefaultUser.')
755 }
756 }
757 if $rails_env {
758 if (versioncmp($passenger_installed_version, '2.0.0') < 0) {
759 fail("Passenger config option :: rails_env is not introduced until version 2.0.0 :: ${passenger_installed_version} is the version reported")
760 }
761 }
762 if $rails_framework_spawner_idle_time {
763 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
764 fail('REMOVED PASSENGER OPTION :: rails_framework_spawner_idle_time :: This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead.')
765 }
766 }
767 if $rails_ruby {
768 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
769 warning('DEPRECATED PASSENGER OPTION :: rails_ruby :: Deprecated in 3.0.0 in favor of PassengerRuby.')
770 }
771 }
772 if $rails_spawn_method {
773 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
774 warning('DEPRECATED PASSENGER OPTION :: rails_spawn_method :: Deprecated in 3.0.0 in favor of PassengerSpawnMethod.')
775 }
776 }
777 if $rails_user_switching {
778 if (versioncmp($passenger_installed_version, '3.0.0') > 0) {
779 warning('DEPRECATED PASSENGER OPTION :: rails_user_switching :: Deprecated in 3.0.0 in favor of PassengerUserSwitching.')
780 }
781 }
782 if $wsgi_auto_detect {
783 if (versioncmp($passenger_installed_version, '4.0.0') > 0) {
784 fail('REMOVED PASSENGER OPTION :: wsgi_auto_detect :: These options have been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.')
785 }
786 }
34 } 787 }
35 if $passenger_log_file {
36 validate_absolute_path($passenger_log_file)
37 }
38
39 # Managed by the package, but declare it to avoid purging 788 # Managed by the package, but declare it to avoid purging
40 if $passenger_conf_package_file { 789 if $passenger_conf_package_file {
41 file { 'passenger_package.conf': 790 file { 'passenger_package.conf':
42 path => "${::apache::confd_dir}/${passenger_conf_package_file}", 791 path => "${::apache::confd_dir}/${passenger_conf_package_file}",
43 } 792 }
67 ensure => 'present', 816 ensure => 'present',
68 baseurl => $baseurl, 817 baseurl => $baseurl,
69 descr => 'passenger', 818 descr => 'passenger',
70 enabled => '1', 819 enabled => '1',
71 gpgcheck => '0', 820 gpgcheck => '0',
72 gpgkey => 'https://packagecloud.io/gpg.key', 821 gpgkey => 'https://packagecloud.io/phusion/passenger/gpgkey',
73 repo_gpgcheck => '1', 822 repo_gpgcheck => '1',
74 sslcacert => '/etc/pki/tls/certs/ca-bundle.crt', 823 sslcacert => '/etc/pki/tls/certs/ca-bundle.crt',
75 sslverify => '1', 824 sslverify => '1',
76 before => Apache::Mod['passenger'], 825 before => Apache::Mod['passenger'],
77 } 826 }
90 loadfile_name => 'zpassenger.load', 839 loadfile_name => 'zpassenger.load',
91 } 840 }
92 } 841 }
93 842
94 # Template uses: 843 # Template uses:
95 # - $passenger_root 844 # - $passenger_allow_encoded_slashes : since 4.0.0.
96 # - $passenger_ruby 845 # - $passenger_app_env : since 4.0.0.
97 # - $passenger_default_ruby 846 # - $passenger_app_group_name : since 4.0.0.
98 # - $passenger_max_pool_size 847 # - $passenger_app_root : since 4.0.0.
99 # - $passenger_min_instances 848 # - $passenger_app_type : since 4.0.25.
100 # - $passenger_max_instances_per_app 849 # - $passenger_base_uri : since 4.0.0.
101 # - $passenger_high_performance 850 # - $passenger_buffer_response : since 4.0.0.
102 # - $passenger_max_requests 851 # - $passenger_buffer_upload : since 4.0.26.
103 # - $passenger_spawn_method 852 # - $passenger_concurrency_model : since 4.0.0.
104 # - $passenger_stat_throttle_rate 853 # - $passenger_data_buffer_dir : since 5.0.0.
105 # - $passenger_use_global_queue 854 # - $passenger_debug_log_file : since unkown. Deprecated in 5.0.5.
106 # - $passenger_log_file 855 # - $passenger_debugger : since 3.0.0.
107 # - $passenger_log_level 856 # - $passenger_default_group : since 3.0.0.
108 # - $passenger_app_env 857 # - $passenger_default_ruby : since 4.0.0.
109 # - $passenger_data_buffer_dir 858 # - $passenger_default_user : since 3.0.0.
110 # - $rack_autodetect 859 # - $passenger_disable_security_update_check : since 5.1.0.
111 # - $rails_autodetect 860 # - $passenger_enabled : since 4.0.0.
861 # - $passenger_error_override : since 4.0.24.
862 # - $passenger_file_descriptor_log_file : since 5.0.5.
863 # - $passenger_fly_with : since 4.0.45.
864 # - $passenger_force_max_concurrent_requests_per_process : since 5.0.22.
865 # - $passenger_friendly_error_pages : since 4.0.42.
866 # - $passenger_group : since 4.0.0.
867 # - $passenger_high_performance : since 2.0.0.
868 # - $passenger_instance_registry_dir : since 5.0.0.
869 # - $passenger_load_shell_envvars : since 4.0.20.
870 # - $passenger_log_file : since 5.0.5.
871 # - $passenger_log_level : since 3.0.0.
872 # - $passenger_lve_min_uid : since 5.0.28.
873 # - $passenger_max_instances : since 3.0.0.
874 # - $passenger_max_instances_per_app : since 3.0.0.
875 # - $passenger_max_pool_size : since 1.0.0.
876 # - $passenger_max_preloader_idle_time : since 4.0.0.
877 # - $passenger_max_request_queue_size : since 4.0.15.
878 # - $passenger_max_request_time : since 3.0.0.
879 # - $passenger_max_requests : since 3.0.0.
880 # - $passenger_memory_limit : since 3.0.0.
881 # - $passenger_meteor_app_settings : since 5.0.7.
882 # - $passenger_min_instances : since 3.0.0.
883 # - $passenger_nodejs : since 4.0.24.
884 # - $passenger_pool_idle_time : since 1.0.0.
885 # - $passenger_pre_start : since 3.0.0.
886 # - $passenger_python : since 4.0.0.
887 # - $passenger_resist_deployment_errors : since 3.0.0.
888 # - $passenger_resolve_symlinks_in_document_root : since 3.0.0.
889 # - $passenger_response_buffer_high_watermark : since 5.0.0.
890 # - $passenger_restart_dir : since 3.0.0.
891 # - $passenger_rolling_restarts : since 3.0.0.
892 # - $passenger_root : since 1.0.0.
893 # - $passenger_ruby : since 4.0.0.
894 # - $passenger_security_update_check_proxy : since 5.1.0.
895 # - $passenger_show_version_in_header : since 5.1.0.
896 # - $passenger_socket_backlog : since 5.0.24.
897 # - $passenger_spawn_method : since 2.0.0.
898 # - $passenger_start_timeout : since 4.0.15.
899 # - $passenger_startup_file : since 4.0.25.
900 # - $passenger_stat_throttle_rate : since 2.2.0.
901 # - $passenger_sticky_sessions : since 4.0.45.
902 # - $passenger_sticky_sessions_cookie_name : since 4.0.45.
903 # - $passenger_thread_count : since 4.0.0.
904 # - $passenger_use_global_queue : since 2.0.4.Deprecated in 4.0.0.
905 # - $passenger_user : since 4.0.0.
906 # - $passenger_user_switching : since 3.0.0.
907 # - $rack_auto_detect : since unkown. Deprecated in 4.0.0.
908 # - $rack_base_uri : since unkown. Deprecated in 3.0.0.
909 # - $rack_env : since 2.0.0.
910 # - $rails_allow_mod_rewrite : since unkown. Deprecated in 4.0.0.
911 # - $rails_app_spawner_idle_time : since unkown. Deprecated in 4.0.0.
912 # - $rails_auto_detect : since unkown. Deprecated in 4.0.0.
913 # - $rails_base_uri : since unkown. Deprecated in 3.0.0.
914 # - $rails_default_user : since unkown. Deprecated in 3.0.0.
915 # - $rails_env : since 2.0.0.
916 # - $rails_framework_spawner_idle_time : since unkown. Deprecated in 4.0.0.
917 # - $rails_ruby : since unkown. Deprecated in 3.0.0.
918 # - $rails_spawn_method : since unkown. Deprecated in 3.0.0.
919 # - $rails_user_switching : since unkown. Deprecated in 3.0.0.
920 # - $wsgi_auto_detect : since unkown. Deprecated in 4.0.0.
921 # - $rails_autodetect : this options is only for backward compatiblity with older versions of this class
922 # - $rack_autodetect : this options is only for backward compatiblity with older versions of this class
112 file { 'passenger.conf': 923 file { 'passenger.conf':
113 ensure => file, 924 ensure => file,
114 path => "${::apache::mod_dir}/${passenger_conf_file}", 925 path => "${::apache::mod_dir}/${passenger_conf_file}",
115 content => template('apache/mod/passenger.conf.erb'), 926 content => template('apache/mod/passenger.conf.erb'),
116 require => Exec["mkdir ${::apache::mod_dir}"], 927 require => Exec["mkdir ${::apache::mod_dir}"],