equal
deleted
inserted
replaced
|
1 # Define puppi::log |
|
2 # |
|
3 # This define creates a basic log file that simply contains |
|
4 # the list of logs to show when issuing the puppi log command. |
|
5 # |
|
6 # == Usage: |
|
7 # puppi::log { "system": |
|
8 # description => "General System Logs" , |
|
9 # log => [ "/var/log/syslog" , "/var/log/messages" ], |
|
10 # } |
|
11 # |
|
12 # :include:../README.log |
|
13 # |
|
14 define puppi::log ( |
|
15 $log, |
|
16 $description = '' ) { |
|
17 |
|
18 require puppi |
|
19 require puppi::params |
|
20 |
|
21 $array_log = is_array($log) ? { |
|
22 false => split($log, ','), |
|
23 default => $log, |
|
24 } |
|
25 |
|
26 file { "${puppi::params::logsdir}/${name}": |
|
27 ensure => 'present', |
|
28 mode => '0644', |
|
29 owner => $puppi::params::configfile_owner, |
|
30 group => $puppi::params::configfile_group, |
|
31 require => Class['puppi'], |
|
32 content => template('puppi/log.erb'), |
|
33 tag => 'puppi_log', |
|
34 } |
|
35 |
|
36 } |