Puppet Class: confdroid_alloy::main::files

Inherits:
confdroid_alloy::params
Defined in:
manifests/main/files.pp

Summary

Class manages required config files for the confdroid_alloy module

Overview

confdroid_alloy::main::files.pp Module name: confdroid_alloy Author: 12ww1160 (12ww1160@confdroid.com)



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/main/files.pp', line 6

class confdroid_alloy::main::files (

) inherits confdroid_alloy::params {
  require confdroid_alloy::main::dirs

  # Ensure log_targets is always an array
  $log_targets_array = Array($confdroid_alloy::params::ay_log_targets, true)

  file { $ay_main_file:
    ensure   => file,
    owner    => 'root',
    group    => 'root',
    mode     => '0644',
    selrange => s0,
    selrole  => object_r,
    seltype  => etc_t,
    seluser  => system_u,
    content  => template('confdroid_alloy/config.alloy.erb'),
    notify   => Service[$ay_service],
  }

  # manage logrotate for rsyslog to allow adm group membership
  file { '/etc/logrotate.d/rsyslog':
    ensure   => file,
    owner    => 'root',
    group    => 'root',
    mode     => '0644',
    selrange => s0,
    selrole  => object_r,
    seltype  => etc_t,
    seluser  => system_u,
    content  => template('confdroid_alloy/logrotate.rsyslog.erb'),
  }

  # manage log file group permissions
  file { '/var/log/messages':
    ensure => file,
    owner  => 'root',
    group  => 'adm',
    mode   => '0640',
    notify => Service[$ay_service],
  }

  file { '/var/log/secure':
    ensure => file,
    owner  => 'root',
    group  => 'adm',
    mode   => '0640',
    notify => Service[$ay_service],
  }
}