Puppet Class: php::fpm

Defined in:
manifests/fpm.pp

Overview

Manage PHP FastCGI Process Manager.

Examples:

Declaring the class

include ::php
include ::php::fpm

Parameters:

  • conf_dir (Stdlib::Absolutepath)
  • conf_file (Stdlib::Absolutepath)
  • package_name (String)
  • service_name (String)
  • daemonize (Optional[Boolean]) (defaults to: undef)
  • emergency_restart_interval (Optional[PHP::Type::FPM::Timeout]) (defaults to: undef)
  • emergency_restart_threshold (Optional[Integer[0]]) (defaults to: undef)
  • error_log (Optional[Stdlib::Absolutepath]) (defaults to: undef)
  • log_level (Optional[Enum['alert', 'error', 'warning', 'notice', 'debug']]) (defaults to: undef)
  • pid (Optional[Stdlib::Absolutepath]) (defaults to: undef)
  • process_control_timeout (Optional[PHP::Type::FPM::Timeout]) (defaults to: undef)
  • pools (Hash[String, Hash[String, Any]]) (defaults to: {})

See Also:

Since:

  • 1.0.0



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'manifests/fpm.pp', line 24

class php::fpm (
  Stdlib::Absolutepath                                           $conf_dir,
  Stdlib::Absolutepath                                           $conf_file,
  String                                                         $package_name,
  String                                                         $service_name,
  Optional[Boolean]                                              $daemonize                   = undef,
  Optional[PHP::Type::FPM::Timeout]                              $emergency_restart_interval  = undef,
  Optional[Integer[0]]                                           $emergency_restart_threshold = undef,
  Optional[Stdlib::Absolutepath]                                 $error_log                   = undef,
  Optional[Enum['alert', 'error', 'warning', 'notice', 'debug']] $log_level                   = undef,
  Optional[Stdlib::Absolutepath]                                 $pid                         = undef,
  Optional[PHP::Type::FPM::Timeout]                              $process_control_timeout     = undef,
  Hash[String, Hash[String, Any]]                                $pools                       = {},
) {

  if ! defined(Class['::php']) {
    fail('You must include the php base class before using the php::fpm class')
  }

  contain ::php::fpm::install
  contain ::php::fpm::config
  contain ::php::fpm::service

  Class['::php::fpm::install'] -> Class['::php::fpm::config']
    ~> Class['::php::fpm::service']

  ::Php::Extension <||> ~> Class['::php::fpm::service'] # lint:ignore:spaceship_operator_without_tag
  ::Php::Setting <||> ~> Class['::php::fpm::service'] # lint:ignore:spaceship_operator_without_tag
  Resources['php_ini_setting'] ~> Class['::php::fpm::service']
}