Puppet Class: central_auth::service

Defined in:
manifests/service.pp

Overview

Class to set up the services for central_auth



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/service.pp', line 2

class central_auth::service (
  # Class parameters are populated from External(hiera)/Defaults/Fail
) {

  if versioncmp( $::operatingsystemrelease, '7' ) < 0 {
    $messagebus = 'messagebus'
  }
  else {
    $messagebus = 'dbus'
  }

  if $central_auth::enable_sssd {
    $service_state = 'running'
  } else {
    $service_state = 'stopped'
  }

  service { 'sssd':
    ensure => $service_state,
    enable => $central_auth::enable_sssd,
    tag    => undef,
  }

  if $::osfamily == 'RedHat' and $central_auth::enable_sssd {
    service { 'oddjobd':
      ensure  => running,
      enable  => true,
      require => Service[$messagebus],
    }

    if versioncmp( $::operatingsystemrelease, '7' ) < 0 {
      service { $messagebus:
        ensure => running,
        enable => true,
      }
    }
    else {
      service { $messagebus:
        ensure => running,
      }
    }
  }

}