Mercurial > repos > other > Puppet
comparison modules/apache/manifests/mod/passenger.pp @ 437:b8d6ada284dd
Update Apache module to latest version
Also converted some params to ints to match
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 14 Aug 2022 11:30:13 +0100 |
parents | d9352a684e62 |
children | adf6fe9bbc17 |
comparison
equal
deleted
inserted
replaced
436:6293839019d0 | 437:b8d6ada284dd |
---|---|
23 # @param mod_path | 23 # @param mod_path |
24 # Specifies a path to the module. Do not manually set this parameter without a special reason. | 24 # Specifies a path to the module. Do not manually set this parameter without a special reason. |
25 # | 25 # |
26 # @param passenger_allow_encoded_slashes | 26 # @param passenger_allow_encoded_slashes |
27 # Toggle whether URLs with encoded slashes (%2f) can be used (by default Apache does not support this). | 27 # Toggle whether URLs with encoded slashes (%2f) can be used (by default Apache does not support this). |
28 # | |
29 # @param passenger_anonymous_telemetry_proxy | |
30 # Set an intermediate proxy for the Passenger anonymous telemetry reporting. | |
28 # | 31 # |
29 # @param passenger_app_env | 32 # @param passenger_app_env |
30 # This option sets, for the current application, the value of the following environment variables: | 33 # This option sets, for the current application, the value of the following environment variables: |
31 # - RAILS_ENV | 34 # - RAILS_ENV |
32 # - RACK_ENV | 35 # - RACK_ENV |
78 # File path to desired ruby interpreter to use by default. | 81 # File path to desired ruby interpreter to use by default. |
79 # | 82 # |
80 # @param passenger_default_user | 83 # @param passenger_default_user |
81 # Allows you to specify the user that applications must run as, if user switching fails or is disabled. | 84 # Allows you to specify the user that applications must run as, if user switching fails or is disabled. |
82 # | 85 # |
86 # @param passenger_disable_anonymous_telemetry | |
87 # Whether or not to disable the Passenger anonymous telemetry reporting. | |
88 # | |
89 # @param passenger_disable_log_prefix | |
90 # Whether to stop Passenger from prefixing logs when they are written to a log file. | |
91 # | |
83 # @param passenger_disable_security_update_check | 92 # @param passenger_disable_security_update_check |
84 # Allows disabling the Passenger security update check, a daily check with https://securitycheck.phusionpassenger.com for important | 93 # Allows disabling the Passenger security update check, a daily check with https://securitycheck.phusionpassenger.com for important |
85 # security updates that might be available. | 94 # security updates that might be available. |
86 # | 95 # |
87 # @param passenger_enabled | 96 # @param passenger_enabled |
118 # Specifies the directory that Passenger should use for registering its current instance. | 127 # Specifies the directory that Passenger should use for registering its current instance. |
119 # | 128 # |
120 # @param passenger_load_shell_envvars | 129 # @param passenger_load_shell_envvars |
121 # Enables or disables the loading of shell environment variables before spawning the application. | 130 # Enables or disables the loading of shell environment variables before spawning the application. |
122 # | 131 # |
132 # @param passenger_preload_bundler | |
133 # Enables or disables loading bundler before loading your Ruby app. | |
134 # | |
123 # @param passenger_log_file | 135 # @param passenger_log_file |
124 # File path to log file. By default Passenger log messages are written to the Apache global error log. | 136 # File path to log file. By default Passenger log messages are written to the Apache global error log. |
125 # | 137 # |
126 # @param passenger_log_level | 138 # @param passenger_log_level |
127 # Specifies how much information Passenger should log to its log file. A higher log level value means that more | 139 # Specifies how much information Passenger should log to its log file. A higher log level value means that more |
202 # Toggle whether Passenger will output its version number in the X-Powered-By header in all Passenger-served requests: | 214 # Toggle whether Passenger will output its version number in the X-Powered-By header in all Passenger-served requests: |
203 # | 215 # |
204 # @param passenger_socket_backlog | 216 # @param passenger_socket_backlog |
205 # This option can be raised if Apache manages to overflow the backlog queue. | 217 # This option can be raised if Apache manages to overflow the backlog queue. |
206 # | 218 # |
219 # @param passenger_spawn_dir | |
220 # The directory in which Passenger will record progress during startup | |
221 # | |
207 # @param passenger_spawn_method | 222 # @param passenger_spawn_method |
208 # Controls whether Passenger spawns applications directly, or using a prefork copy-on-write mechanism. | 223 # Controls whether Passenger spawns applications directly, or using a prefork copy-on-write mechanism. |
209 # | 224 # |
210 # @param passenger_start_timeout | 225 # @param passenger_start_timeout |
211 # Specifies a timeout for the startup of application processes. | 226 # Specifies a timeout for the startup of application processes. |
219 # @param passenger_sticky_sessions | 234 # @param passenger_sticky_sessions |
220 # Toggles whether all requests that a client sends will be routed to the same originating application process, whenever possible. | 235 # Toggles whether all requests that a client sends will be routed to the same originating application process, whenever possible. |
221 # | 236 # |
222 # @param passenger_sticky_sessions_cookie_name | 237 # @param passenger_sticky_sessions_cookie_name |
223 # Sets the name of the sticky sessions cookie. | 238 # Sets the name of the sticky sessions cookie. |
239 # | |
240 # @param passenger_sticky_sessions_cookie_attributes | |
241 # Sets the attributes of the sticky sessions cookie. | |
224 # | 242 # |
225 # @param passenger_thread_count | 243 # @param passenger_thread_count |
226 # Specifies the number of threads that Passenger should spawn per Ruby application process. | 244 # Specifies the number of threads that Passenger should spawn per Ruby application process. |
227 # | 245 # |
228 # @param passenger_use_global_queue | 246 # @param passenger_use_global_queue |
299 # Change Log: | 317 # Change Log: |
300 # - As of 08/13/2017 there are 84 available/deprecated/removed settings. | 318 # - As of 08/13/2017 there are 84 available/deprecated/removed settings. |
301 # - Around 08/20/2017 UnionStation was discontinued options were removed. | 319 # - Around 08/20/2017 UnionStation was discontinued options were removed. |
302 # - As of 08/20/2017 there are 77 available/deprecated/removed settings. | 320 # - As of 08/20/2017 there are 77 available/deprecated/removed settings. |
303 # | 321 # |
304 # @see https://www.phusionpassenger.com/library/config/apache/reference/ for additional documentation. | 322 # @see https://www.phusionpassenger.com/docs/references/config_reference/apache/ for additional documentation. |
305 # | 323 # |
306 class apache::mod::passenger ( | 324 class apache::mod::passenger ( |
307 $manage_repo = true, | 325 Boolean $manage_repo = true, |
308 $mod_id = undef, | 326 Optional[String] $mod_id = undef, |
309 $mod_lib = undef, | 327 Optional[String] $mod_lib = undef, |
310 $mod_lib_path = undef, | 328 Optional[String] $mod_lib_path = undef, |
311 $mod_package = undef, | 329 Optional[String] $mod_package = undef, |
312 $mod_package_ensure = undef, | 330 Optional[String] $mod_package_ensure = undef, |
313 $mod_path = undef, | 331 Optional[String] $mod_path = undef, |
314 $passenger_allow_encoded_slashes = undef, | 332 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_allow_encoded_slashes = undef, |
315 $passenger_app_env = undef, | 333 Optional[String] $passenger_anonymous_telemetry_proxy = undef, |
316 $passenger_app_group_name = undef, | 334 Optional[String] $passenger_app_env = undef, |
317 $passenger_app_root = undef, | 335 Optional[String] $passenger_app_group_name = undef, |
318 $passenger_app_type = undef, | 336 Optional[String] $passenger_app_root = undef, |
319 $passenger_base_uri = undef, | 337 Optional[String] $passenger_app_type = undef, |
320 $passenger_buffer_response = undef, | 338 Optional[String] $passenger_base_uri = undef, |
321 $passenger_buffer_upload = undef, | 339 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_buffer_response = undef, |
322 $passenger_concurrency_model = undef, | 340 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_buffer_upload = undef, |
323 $passenger_conf_file = $::apache::params::passenger_conf_file, | 341 Optional[String] $passenger_concurrency_model = undef, |
324 $passenger_conf_package_file = $::apache::params::passenger_conf_package_file, | 342 String $passenger_conf_file = $apache::params::passenger_conf_file, |
325 $passenger_data_buffer_dir = undef, | 343 Optional[String] $passenger_conf_package_file = $apache::params::passenger_conf_package_file, |
326 $passenger_debug_log_file = undef, | 344 Optional[Stdlib::Absolutepath] $passenger_data_buffer_dir = undef, |
327 $passenger_debugger = undef, | 345 Optional[String] $passenger_debug_log_file = undef, |
328 $passenger_default_group = undef, | 346 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_debugger = undef, |
329 $passenger_default_ruby = $::apache::params::passenger_default_ruby, | 347 Optional[String] $passenger_default_group = undef, |
330 $passenger_default_user = undef, | 348 Optional[String] $passenger_default_ruby = $apache::params::passenger_default_ruby, |
331 $passenger_disable_security_update_check = undef, | 349 Optional[String] $passenger_default_user = undef, |
332 $passenger_enabled = undef, | 350 Optional[Boolean] $passenger_disable_anonymous_telemetry = undef, |
333 $passenger_error_override = undef, | 351 Optional[Boolean] $passenger_disable_log_prefix = undef, |
334 $passenger_file_descriptor_log_file = undef, | 352 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_disable_security_update_check = undef, |
335 $passenger_fly_with = undef, | 353 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_enabled = undef, |
336 $passenger_force_max_concurrent_requests_per_process = undef, | 354 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_error_override = undef, |
337 $passenger_friendly_error_pages = undef, | 355 Optional[String] $passenger_file_descriptor_log_file = undef, |
338 $passenger_group = undef, | 356 Optional[String] $passenger_fly_with = undef, |
339 $passenger_high_performance = undef, | 357 Optional[Variant[Integer, String]] $passenger_force_max_concurrent_requests_per_process = undef, |
340 $passenger_installed_version = undef, | 358 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_friendly_error_pages = undef, |
341 $passenger_instance_registry_dir = undef, | 359 Optional[String] $passenger_group = undef, |
342 $passenger_load_shell_envvars = undef, | 360 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_high_performance = undef, |
361 Optional[String] $passenger_installed_version = undef, | |
362 Optional[String] $passenger_instance_registry_dir = undef, | |
363 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_load_shell_envvars = undef, | |
364 Optional[Boolean] $passenger_preload_bundler = undef, | |
343 Optional[Stdlib::Absolutepath] $passenger_log_file = undef, | 365 Optional[Stdlib::Absolutepath] $passenger_log_file = undef, |
344 $passenger_log_level = undef, | 366 Optional[Integer] $passenger_log_level = undef, |
345 $passenger_lve_min_uid = undef, | 367 Optional[Integer] $passenger_lve_min_uid = undef, |
346 $passenger_max_instances = undef, | 368 Optional[Integer] $passenger_max_instances = undef, |
347 $passenger_max_instances_per_app = undef, | 369 Optional[Integer] $passenger_max_instances_per_app = undef, |
348 $passenger_max_pool_size = undef, | 370 Optional[Integer] $passenger_max_pool_size = undef, |
349 $passenger_max_preloader_idle_time = undef, | 371 Optional[Integer] $passenger_max_preloader_idle_time = undef, |
350 $passenger_max_request_queue_size = undef, | 372 Optional[Integer] $passenger_max_request_queue_size = undef, |
351 $passenger_max_request_time = undef, | 373 Optional[Integer] $passenger_max_request_time = undef, |
352 $passenger_max_requests = undef, | 374 Optional[Integer] $passenger_max_requests = undef, |
353 $passenger_memory_limit = undef, | 375 Optional[Integer] $passenger_memory_limit = undef, |
354 $passenger_meteor_app_settings = undef, | 376 Optional[String] $passenger_meteor_app_settings = undef, |
355 $passenger_min_instances = undef, | 377 Optional[Integer] $passenger_min_instances = undef, |
356 $passenger_nodejs = undef, | 378 Optional[String] $passenger_nodejs = undef, |
357 $passenger_pool_idle_time = undef, | 379 Optional[Integer] $passenger_pool_idle_time = undef, |
358 Optional[Variant[String,Array[String]]] $passenger_pre_start = undef, | 380 Optional[Variant[String, Array[String]]] $passenger_pre_start = undef, |
359 $passenger_python = undef, | 381 Optional[String] $passenger_python = undef, |
360 $passenger_resist_deployment_errors = undef, | 382 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_resist_deployment_errors = undef, |
361 $passenger_resolve_symlinks_in_document_root = undef, | 383 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_resolve_symlinks_in_document_root = undef, |
362 $passenger_response_buffer_high_watermark = undef, | 384 Optional[Variant[Integer, String]] $passenger_response_buffer_high_watermark = undef, |
363 $passenger_restart_dir = undef, | 385 Optional[String] $passenger_restart_dir = undef, |
364 $passenger_rolling_restarts = undef, | 386 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_rolling_restarts = undef, |
365 $passenger_root = $::apache::params::passenger_root, | 387 Optional[String] $passenger_root = $apache::params::passenger_root, |
366 $passenger_ruby = $::apache::params::passenger_ruby, | 388 Optional[String] $passenger_ruby = $apache::params::passenger_ruby, |
367 $passenger_security_update_check_proxy = undef, | 389 Optional[String] $passenger_security_update_check_proxy = undef, |
368 $passenger_show_version_in_header = undef, | 390 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_show_version_in_header = undef, |
369 $passenger_socket_backlog = undef, | 391 Optional[Variant[Integer, String]] $passenger_socket_backlog = undef, |
392 Optional[String] $passenger_spawn_dir = undef, | |
370 Optional[Enum['smart', 'direct', 'smart-lv2', 'conservative']] $passenger_spawn_method = undef, | 393 Optional[Enum['smart', 'direct', 'smart-lv2', 'conservative']] $passenger_spawn_method = undef, |
371 $passenger_start_timeout = undef, | 394 Optional[Integer] $passenger_start_timeout = undef, |
372 $passenger_startup_file = undef, | 395 Optional[String] $passenger_startup_file = undef, |
373 $passenger_stat_throttle_rate = undef, | 396 Optional[Integer] $passenger_stat_throttle_rate = undef, |
374 $passenger_sticky_sessions = undef, | 397 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_sticky_sessions = undef, |
375 $passenger_sticky_sessions_cookie_name = undef, | 398 Optional[String] $passenger_sticky_sessions_cookie_name = undef, |
376 $passenger_thread_count = undef, | 399 Optional[String] $passenger_sticky_sessions_cookie_attributes = undef, |
377 $passenger_use_global_queue = undef, | 400 Optional[Integer] $passenger_thread_count = undef, |
378 $passenger_user = undef, | 401 Optional[String] $passenger_use_global_queue = undef, |
379 $passenger_user_switching = undef, | 402 Optional[String] $passenger_user = undef, |
380 $rack_auto_detect = undef, | 403 Optional[Enum['on', 'off', 'On', 'Off']] $passenger_user_switching = undef, |
381 $rack_autodetect = undef, | 404 Optional[String] $rack_auto_detect = undef, |
382 $rack_base_uri = undef, | 405 Optional[String] $rack_autodetect = undef, |
383 $rack_env = undef, | 406 Optional[String] $rack_base_uri = undef, |
384 $rails_allow_mod_rewrite = undef, | 407 Optional[String] $rack_env = undef, |
385 $rails_app_spawner_idle_time = undef, | 408 Optional[String] $rails_allow_mod_rewrite = undef, |
386 $rails_auto_detect = undef, | 409 Optional[String] $rails_app_spawner_idle_time = undef, |
387 $rails_autodetect = undef, | 410 Optional[String] $rails_auto_detect = undef, |
388 $rails_base_uri = undef, | 411 Optional[String] $rails_autodetect = undef, |
389 $rails_default_user = undef, | 412 Optional[String] $rails_base_uri = undef, |
390 $rails_env = undef, | 413 Optional[String] $rails_default_user = undef, |
391 $rails_framework_spawner_idle_time = undef, | 414 Optional[String] $rails_env = undef, |
392 $rails_ruby = undef, | 415 Optional[String] $rails_framework_spawner_idle_time = undef, |
393 $rails_spawn_method = undef, | 416 Optional[String] $rails_ruby = undef, |
394 $rails_user_switching = undef, | 417 Optional[String] $rails_spawn_method = undef, |
395 $wsgi_auto_detect = undef, | 418 Optional[String] $rails_user_switching = undef, |
396 ) inherits ::apache::params { | 419 Optional[String] $wsgi_auto_detect = undef, |
397 include ::apache | 420 ) inherits apache::params { |
421 include apache | |
398 if $passenger_installed_version { | 422 if $passenger_installed_version { |
399 if $passenger_allow_encoded_slashes { | 423 if $passenger_allow_encoded_slashes { |
400 if (versioncmp($passenger_installed_version, '4.0.0') < 0) { | 424 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") | 425 fail("Passenger config option :: passenger_allow_encoded_slashes is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported") |
426 } | |
427 } | |
428 if $passenger_anonymous_telemetry_proxy { | |
429 if (versioncmp($passenger_installed_version, '6.0.0') < 0) { | |
430 fail("Passenger config option :: passenger_anonymous_telemetry_proxy is not introduced until version 6.0.0 :: ${passenger_installed_version} is the version reported") | |
402 } | 431 } |
403 } | 432 } |
404 if $passenger_app_env { | 433 if $passenger_app_env { |
405 if (versioncmp($passenger_installed_version, '4.0.0') < 0) { | 434 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") | 435 fail("Passenger config option :: passenger_app_env is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported") |
469 if $passenger_default_user { | 498 if $passenger_default_user { |
470 if (versioncmp($passenger_installed_version, '3.0.0') < 0) { | 499 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") | 500 fail("Passenger config option :: passenger_default_user is not introduced until version 3.0.0 :: ${passenger_installed_version} is the version reported") |
472 } | 501 } |
473 } | 502 } |
503 if $passenger_disable_anonymous_telemetry { | |
504 if (versioncmp($passenger_installed_version, '6.0.0') < 0) { | |
505 fail("Passenger config option :: passenger_disable_anonymous_telemetry is not introduced until version 6.0.0 :: ${passenger_installed_version} is the version reported") | |
506 } | |
507 } | |
508 if $passenger_disable_log_prefix { | |
509 if (versioncmp($passenger_installed_version, '6.0.2') < 0) { | |
510 fail("Passenger config option :: passenger_disable_log_prefix is not introduced until version 6.0.2 :: ${passenger_installed_version} is the version reported") | |
511 } | |
512 } | |
474 if $passenger_disable_security_update_check { | 513 if $passenger_disable_security_update_check { |
475 if (versioncmp($passenger_installed_version, '5.1.0') < 0) { | 514 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") | 515 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 } | 516 } |
478 } | 517 } |
524 if $passenger_load_shell_envvars { | 563 if $passenger_load_shell_envvars { |
525 if (versioncmp($passenger_installed_version, '4.0.20') < 0) { | 564 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") | 565 fail("Passenger config option :: passenger_load_shell_envvars is not introduced until version 4.0.20 :: ${passenger_installed_version} is the version reported") |
527 } | 566 } |
528 } | 567 } |
568 if $passenger_preload_bundler { | |
569 if (versioncmp($passenger_installed_version, '6.0.13') < 0) { | |
570 fail("Passenger config option :: passenger_preload_bundler is not introduced until version 6.0.13 :: ${passenger_installed_version} is the version reported") | |
571 } | |
572 } | |
529 if $passenger_log_file { | 573 if $passenger_log_file { |
530 if (versioncmp($passenger_installed_version, '5.0.5') < 0) { | 574 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") | 575 fail("Passenger config option :: passenger_log_file is not introduced until version 5.0.5 :: ${passenger_installed_version} is the version reported") |
532 } | 576 } |
533 } | 577 } |
659 if $passenger_socket_backlog { | 703 if $passenger_socket_backlog { |
660 if (versioncmp($passenger_installed_version, '5.0.24') < 0) { | 704 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") | 705 fail("Passenger config option :: passenger_socket_backlog is not introduced until version 5.0.24 :: ${passenger_installed_version} is the version reported") |
662 } | 706 } |
663 } | 707 } |
708 if $passenger_spawn_dir { | |
709 if (versioncmp($passenger_installed_version, '6.0.3') < 0) { | |
710 fail("Passenger config option :: passenger_spawn_dir is not introduced until version 6.0.3 :: ${passenger_installed_version} is the version reported") | |
711 } | |
712 } | |
664 if $passenger_spawn_method { | 713 if $passenger_spawn_method { |
665 if (versioncmp($passenger_installed_version, '2.0.0') < 0) { | 714 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") | 715 fail("Passenger config option :: passenger_spawn_method is not introduced until version 2.0.0 :: ${passenger_installed_version} is the version reported") |
667 } | 716 } |
668 } | 717 } |
687 } | 736 } |
688 } | 737 } |
689 if $passenger_sticky_sessions_cookie_name { | 738 if $passenger_sticky_sessions_cookie_name { |
690 if (versioncmp($passenger_installed_version, '4.0.45') < 0) { | 739 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") | 740 fail("Passenger config option :: passenger_sticky_sessions_cookie_name is not introduced until version 4.0.45 :: ${passenger_installed_version} is the version reported") |
741 } | |
742 } | |
743 if $passenger_sticky_sessions_cookie_attributes { | |
744 if (versioncmp($passenger_installed_version, '6.0.5') < 0) { | |
745 fail("Passenger config option :: passenger_sticky_sessions_cookie_attributes is not introduced until version 6.0.5 :: ${passenger_installed_version} is the version reported") | |
692 } | 746 } |
693 } | 747 } |
694 if $passenger_thread_count { | 748 if $passenger_thread_count { |
695 if (versioncmp($passenger_installed_version, '4.0.0') < 0) { | 749 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") | 750 fail("Passenger config option :: passenger_thread_count is not introduced until version 4.0.0 :: ${passenger_installed_version} is the version reported") |
786 } | 840 } |
787 } | 841 } |
788 # Managed by the package, but declare it to avoid purging | 842 # Managed by the package, but declare it to avoid purging |
789 if $passenger_conf_package_file { | 843 if $passenger_conf_package_file { |
790 file { 'passenger_package.conf': | 844 file { 'passenger_package.conf': |
791 path => "${::apache::confd_dir}/${passenger_conf_package_file}", | 845 path => "${apache::confd_dir}/${passenger_conf_package_file}", |
792 } | 846 } |
793 } | 847 } |
794 | 848 |
795 $_package = $mod_package | 849 $_package = $mod_package |
796 $_package_ensure = $mod_package_ensure | 850 $_package_ensure = $mod_package_ensure |
797 $_lib = $mod_lib | 851 $_lib = $mod_lib |
798 if $::osfamily == 'FreeBSD' { | 852 if $facts['os']['family'] == 'FreeBSD' { |
799 if $mod_lib_path { | 853 if $mod_lib_path { |
800 $_lib_path = $mod_lib_path | 854 $_lib_path = $mod_lib_path |
801 } else { | 855 } else { |
802 $_lib_path = "${passenger_root}/buildout/apache2" | 856 $_lib_path = "${passenger_root}/buildout/apache2" |
803 } | 857 } |
804 } else { | 858 } else { |
805 $_lib_path = $mod_lib_path | 859 $_lib_path = $mod_lib_path |
806 } | 860 } |
807 | 861 |
808 if $::osfamily == 'RedHat' and $manage_repo { | 862 if $facts['os']['family'] == 'RedHat' and $manage_repo { |
809 if $::operatingsystem == 'Amazon' { | 863 if $facts['os']['name'] == 'Amazon' { |
810 $baseurl = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/6Server/$basearch' | 864 if $facts['os']['release']['major'] == '2' { |
865 $baseurl = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/7/$basearch' | |
866 } else { | |
867 $baseurl = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/6/$basearch' | |
868 } | |
811 } else { | 869 } else { |
812 $baseurl = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/$releasever/$basearch' | 870 $baseurl = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/$releasever/$basearch' |
813 } | 871 } |
814 | 872 |
815 yumrepo { 'passenger': | 873 yumrepo { 'passenger': |
816 ensure => 'present', | 874 ensure => 'present', |
817 baseurl => $baseurl, | 875 baseurl => $baseurl, |
818 descr => 'passenger', | 876 descr => 'passenger', |
819 enabled => '1', | 877 enabled => '1', |
820 gpgcheck => '0', | 878 gpgcheck => '0', |
821 gpgkey => 'https://packagecloud.io/phusion/passenger/gpgkey', | 879 gpgkey => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', |
822 repo_gpgcheck => '1', | 880 repo_gpgcheck => '1', |
823 sslcacert => '/etc/pki/tls/certs/ca-bundle.crt', | 881 sslcacert => '/etc/pki/tls/certs/ca-bundle.crt', |
824 sslverify => '1', | 882 sslverify => '1', |
825 before => Apache::Mod['passenger'], | 883 before => Apache::Mod['passenger'], |
826 } | 884 } |
827 } | 885 } |
828 | 886 |
829 unless ($::operatingsystem == 'SLES') { | 887 unless ($facts['os']['name'] == 'SLES') { |
830 $_id = $mod_id | 888 $_id = $mod_id |
831 $_path = $mod_path | 889 $_path = $mod_path |
832 ::apache::mod { 'passenger': | 890 ::apache::mod { 'passenger': |
833 package => $_package, | 891 package => $_package, |
834 package_ensure => $_package_ensure, | 892 package_ensure => $_package_ensure, |
865 # - $passenger_friendly_error_pages : since 4.0.42. | 923 # - $passenger_friendly_error_pages : since 4.0.42. |
866 # - $passenger_group : since 4.0.0. | 924 # - $passenger_group : since 4.0.0. |
867 # - $passenger_high_performance : since 2.0.0. | 925 # - $passenger_high_performance : since 2.0.0. |
868 # - $passenger_instance_registry_dir : since 5.0.0. | 926 # - $passenger_instance_registry_dir : since 5.0.0. |
869 # - $passenger_load_shell_envvars : since 4.0.20. | 927 # - $passenger_load_shell_envvars : since 4.0.20. |
928 # - $passenger_preload_bundler : since 6.0.13 | |
870 # - $passenger_log_file : since 5.0.5. | 929 # - $passenger_log_file : since 5.0.5. |
871 # - $passenger_log_level : since 3.0.0. | 930 # - $passenger_log_level : since 3.0.0. |
872 # - $passenger_lve_min_uid : since 5.0.28. | 931 # - $passenger_lve_min_uid : since 5.0.28. |
873 # - $passenger_max_instances : since 3.0.0. | 932 # - $passenger_max_instances : since 3.0.0. |
874 # - $passenger_max_instances_per_app : since 3.0.0. | 933 # - $passenger_max_instances_per_app : since 3.0.0. |
920 # - $wsgi_auto_detect : since unkown. Deprecated in 4.0.0. | 979 # - $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 | 980 # - $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 | 981 # - $rack_autodetect : this options is only for backward compatiblity with older versions of this class |
923 file { 'passenger.conf': | 982 file { 'passenger.conf': |
924 ensure => file, | 983 ensure => file, |
925 path => "${::apache::mod_dir}/${passenger_conf_file}", | 984 path => "${apache::mod_dir}/${passenger_conf_file}", |
926 content => template('apache/mod/passenger.conf.erb'), | 985 content => template('apache/mod/passenger.conf.erb'), |
927 require => Exec["mkdir ${::apache::mod_dir}"], | 986 require => Exec["mkdir ${apache::mod_dir}"], |
928 before => File[$::apache::mod_dir], | 987 before => File[$apache::mod_dir], |
929 notify => Class['apache::service'], | 988 notify => Class['apache::service'], |
930 } | 989 } |
931 } | 990 } |