Puppet Class: sendmail::service

Inherits:
sendmail::params
Defined in:
manifests/service.pp

Summary

Manage the Sendmail service.

Overview

Parameters:

  • service_name (String) (defaults to: $sendmail::params::service_name)

    The service name to use on this operating system. The default is operating system specific.

  • service_enable (Boolean) (defaults to: true)

    Configure whether the Sendmail MTA should be enabled at boot. Valid options: ‘true` or `false`.

  • service_manage (Boolean) (defaults to: true)

    Configure whether Puppet should manage the Sendmail service. Valid options: ‘true` or `false`.

  • service_ensure (Stdlib::Ensure::Service) (defaults to: 'running')

    Configure whether the Sendmail service should be running. Valid options: ‘running` or `stopped`.

  • service_hasstatus (Boolean) (defaults to: true)

    Define whether the service type can rely on a functional status. Valid options: ‘true` or `false`.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/service.pp', line 21

class sendmail::service (
  String                  $service_name      = $sendmail::params::service_name,
  Boolean                 $service_enable    = true,
  Boolean                 $service_manage    = true,
  Stdlib::Ensure::Service $service_ensure    = 'running',
  Boolean                 $service_hasstatus = true,
) inherits sendmail::params {
  if $service_manage {
    service { 'sendmail':
      ensure    => $service_ensure,
      name      => $service_name,
      enable    => $service_enable,
      hasstatus => $service_hasstatus,
    }
  }
}