Puppet Class: st2::timersengine

Inherits:
st2
Defined in:
manifests/timersengine.pp

Summary

Manages the st2timersengine service.

Overview

Normally this class is instantiated by st2::profile::fullinstall. However, advanced users can instantiate this class directly to configure and manage just the st2timersengine service on a single node. Parameters for this class mirror the parameters in the st2 config.

Examples:

Basic usage

include st2::timersengine

Customizing parameters

class { 'st2::timersengine':
  enabled  => true,
  timezone => 'America/Los_Angeles',
}

Parameters:

  • enabled (Any) (defaults to: $st2::timersengine_enabled)

    Specify to enable timer service.

  • timezone (Any) (defaults to: $st2::timersengine_timezone)

    Timezone pertaining to the location where st2 is run.

See Also:



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
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
# File 'manifests/timersengine.pp', line 24

class st2::timersengine (
  $enabled  = $st2::timersengine_enabled,
  $timezone = $st2::timersengine_timezone,
) inherits st2 {

  # st2timersengine was introduced in 2.9.0
  if st2::version_ge('2.9.0') {

    $_logger_config = $st2::syslog ? {
      true    => 'syslog',
      default => 'logging',
    }
    $_enable_timersengine = $enabled ? {
      true    => 'True',
      default => 'False',
    }

    ########################################
    ## Config
    ini_setting { 'timersengine_logging':
      ensure  => present,
      path    => '/etc/st2/st2.conf',
      section => 'timersengine',
      setting => 'logging',
      value   => "/etc/st2/${_logger_config}.timersengine.conf",
      tag     => 'st2::config',
    }

    ini_setting { 'timersengine_enabled':
      ensure  => present,
      path    => '/etc/st2/st2.conf',
      section => 'timersengine',
      setting => 'enabled',
      value   => $_enable_timersengine,
      tag     => 'st2::config',
    }

    ini_setting { 'timersengine_local_timezone':
      ensure  => present,
      path    => '/etc/st2/st2.conf',
      section => 'timersengine',
      setting => 'local_timezone',
      value   => $st2::timersengine_timezone,
      tag     => 'st2::config',
    }

    ########################################
    ## Services
    service { $st2::params::timersengine_services:
      ensure => 'running',
      enable => true,
      tag    => 'st2::service',
    }
  }
}