Puppet Class: supervisord

Defined in:
manifests/init.pp

Overview

Class: supervisord

Main class that includes all other classes for the supervisord module.

Parameters:

  • manage_python (Boolean) (defaults to: true)

    Whether or not to have the module manage python using the stankevich-python module.

  • manage_python_dev (Enum['present', 'absent']) (defaults to: 'present')

    Desired state of the python-dev package passed to python class from stankevich-python module.

  • manage_python_use_epel (Boolean) (defaults to: true)

    Whether or not to use epel passed to python class from stankevich-python module.

  • manage_python_virtualenv (Enum['present', 'absent']) (defaults to: 'present')

    Desired state of the virtualenv package passed to python class from stankevich-python module.

  • manage_service (Boolean) (defaults to: true)

    Whether or not to manage the supervisord service with this module.

  • manage_systemd_unit (Boolean) (defaults to: true)

    Whether or not to manage the systemd unit for supervisord.service with this module.

  • package_ensure (String) (defaults to: 'present')

    Whether to install the supervisord package, and/or what version. Suggested values: 'present', 'latest', or a specific version number.

  • package_name (String) (defaults to: 'supervisor')

    Specifies the name of the package to install.

  • service_enable (Boolean) (defaults to: true)

    Whether to enable the supervisord service at boot.

  • service_ensure (Enum['running', 'stopped']) (defaults to: 'running')

    Whether the supervisord service should be running.

  • service_name (String) (defaults to: 'supervisord')

    Specifies the name of the service to manage.

  • supervisord_binpath (Stdlib::Absolutepath) (defaults to: '/usr/bin/supervisord')

    Path to the supervisord binary. Defaults to location if installed to system.

  • supervisord_confdir (Stdlib::Absolutepath) (defaults to: '/etc/supervisor')

    Configuration directory to use for the supervisord service.

  • supervisord_conffile (String) (defaults to: 'supervisord.conf')

    Configuration file name to use for the supercisord service.

  • supervisord_ctlpath (Stdlib::Absolutepath) (defaults to: '/usr/bin/supervisorctl')

    Path to the supervisorctl binary. Defaults to location if installed to system.

  • supervisord_ini_absent (Optional[Hash]) (defaults to: {})

    INI Settings in supervisord.conf that should be removed if present.

  • supervisord_ini_present (Optional[Hash]) (defaults to: {})

    INI Settings in supervisord.conf that should replace default settings or be added as new settings.

  • supervisord_logdir (Stdlib::Absolutepath) (defaults to: '/var/log/supervisor')

    Log directory for the supervisord service.

  • supervisord_rundir (Stdlib::Absolutepath) (defaults to: '/var/run/supervisor')

    Run-time files directory for the supervisord service.

  • supervisord_systemd_after (Optional[Array]) (defaults to: [])

    Systemd units to append after network.target so that they start before supervisord.

  • supervisord_systemd_killmode (String) (defaults to: 'process')

    Specifies how systemd should kill the processes of the supervisord unit.

  • supervisord_systemd_restart (String) (defaults to: 'on-failure')

    Configures whether the service shall be restarted when the service process exits, is killed, or a timeout is reached.

  • supervisord_systemd_restartsec (String) (defaults to: '50s')

    Configures the time to sleep before restarting a service.

  • supervisord_systemd_template (String) (defaults to: 'supervisord/supervisord.service.erb')

    Template for puppet to use to create the supervisord.service file.

  • supervisord_systemd_type (String) (defaults to: 'forking')

    Configures the process start-up type for the supervisord.service unit.

  • virtualenv (String) (defaults to: 'system')

    Which virtualenv to install supervisor.

  • virtualenv_owner (String) (defaults to: 'root')

    User that should own and run the supervisor daemon.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'manifests/init.pp', line 34

class supervisord (
  Boolean                    $manage_python                  = true,
  Enum['present', 'absent']  $manage_python_dev              = 'present',
  Boolean                    $manage_python_use_epel         = true,
  Enum['present', 'absent']  $manage_python_virtualenv       = 'present',
  Boolean                    $manage_service                 = true,
  Boolean                    $manage_systemd_unit            = true,
  String                     $package_ensure                 = 'present',
  String                     $package_name                   = 'supervisor',
  Boolean                    $service_enable                 = true,
  Enum['running', 'stopped'] $service_ensure                 = 'running',
  String                     $service_name                   = 'supervisord',
  Stdlib::Absolutepath       $supervisord_binpath            = '/usr/bin/supervisord',
  Stdlib::Absolutepath       $supervisord_confdir            = '/etc/supervisor',
  String                     $supervisord_conffile           = 'supervisord.conf',
  Stdlib::Absolutepath       $supervisord_ctlpath            = '/usr/bin/supervisorctl',
  Optional[Hash]             $supervisord_ini_absent         = {},
  Optional[Hash]             $supervisord_ini_present        = {},
  Stdlib::Absolutepath       $supervisord_logdir             = '/var/log/supervisor',
  Stdlib::Absolutepath       $supervisord_rundir             = '/var/run/supervisor',
  Optional[Array]            $supervisord_systemd_after      = [],
  String                     $supervisord_systemd_killmode   = 'process',
  String                     $supervisord_systemd_restart    = 'on-failure',
  String                     $supervisord_systemd_restartsec = '50s',
  String                     $supervisord_systemd_template   = 'supervisord/supervisord.service.erb',
  String                     $supervisord_systemd_type       = 'forking',
  String                     $virtualenv                     = 'system',
  String                     $virtualenv_owner               = 'root',
  ) {
  case $::operatingsystem {
    'RedHat', 'CentOS': {
      contain supervisord::python
      contain supervisord::install
      contain supervisord::config
      contain supervisord::service

      Class['supervisord::python']
      -> Class['supervisord::install']
      -> Class['supervisord::config']
      ~> Class['supervisord::service']
    }
    default: {
      fail("${::operatingsystem} not supported")
    }
  }
}