Puppet Class: sensu::common

Defined in:
manifests/common.pp

Summary

Sensu class for common resources

Overview



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
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'manifests/common.pp', line 4

class sensu::common {
  include sensu

  if $sensu::etc_parent_dir {
    file { 'sensu_dir':
      ensure => 'directory',
      path   => $sensu::etc_parent_dir,
      owner  => $sensu::sensu_user,
      group  => $sensu::sensu_group,
      mode   => $sensu::directory_mode,
    }
  }

  file { 'sensu_etc_dir':
    ensure  => 'directory',
    path    => $sensu::etc_dir,
    owner   => $sensu::sensu_user,
    group   => $sensu::sensu_group,
    mode    => $sensu::directory_mode,
    purge   => $sensu::etc_dir_purge,
    recurse => $sensu::etc_dir_purge,
    force   => $sensu::etc_dir_purge,
  }

  if $sensu::use_ssl {
    contain sensu::ssl
  }

  if $sensu::manage_user and $sensu::sensu_user {
    user { 'sensu':
      ensure     => 'present',
      name       => $sensu::sensu_user,
      forcelocal => true,
      shell      => '/bin/false',
      gid        => $sensu::sensu_group,
      uid        => undef,
      home       => '/var/lib/sensu',
      managehome => false,
      system     => true,
    }
  }
  if $sensu::manage_group and $sensu::sensu_group {
    group { 'sensu':
      ensure     => 'present',
      name       => $sensu::sensu_group,
      forcelocal => true,
      gid        => undef,
      system     => true,
    }
  }

  if $sensu::manage_repo {
    include sensu::repo
  }
}