Puppet Class: nhc::config

Defined in:
manifests/config.pp

Overview

private class



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

class nhc::config {
  assert_private()

  # Define template variables here so that nhc::conf can reuse template
  $configs        = $nhc::configs
  $settings       = $nhc::settings
  $settings_host  = $nhc::settings_host
  $checks         = $nhc::checks

  file { '/etc/nhc':
    ensure => $nhc::directory_ensure,
    path   => $nhc::conf_dir,
    force  => $nhc::_directory_force,
    owner  => 'root',
    group  => 'root',
    mode   => '0700',
  }

  file { '/etc/nhc/nhc.conf':
    ensure  => $nhc::file_ensure,
    path    => $nhc::conf_file,
    content => template('nhc/nhc.conf.erb'),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    require => File['/etc/nhc'],
  }

  file { '/etc/nhc/scripts':
    ensure  => $nhc::directory_ensure,
    path    => $nhc::include_dir,
    owner   => 'root',
    group   => 'root',
    mode    => '0700',
    require => File['/etc/nhc'],
  }

  file { $nhc::sysconfig_path:
    ensure  => $nhc::file_ensure,
    content => template('nhc/sysconfig.erb'),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  if $nhc::manage_logrotate {
    logrotate::rule { 'nhc':
      ensure       => $nhc::ensure,
      path         => $nhc::log_file,
      missingok    => true,
      ifempty      => false,
      rotate_every => $nhc::log_rotate_every,
    }
  }
}