--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/provisioning/modules/puppi/manifests/log.pp Fri Jan 15 15:35:00 2016 +0100
@@ -0,0 +1,36 @@
+# Define puppi::log
+#
+# This define creates a basic log file that simply contains
+# the list of logs to show when issuing the puppi log command.
+#
+# == Usage:
+# puppi::log { "system":
+# description => "General System Logs" ,
+# log => [ "/var/log/syslog" , "/var/log/messages" ],
+# }
+#
+# :include:../README.log
+#
+define puppi::log (
+ $log,
+ $description = '' ) {
+
+ require puppi
+ require puppi::params
+
+ $array_log = is_array($log) ? {
+ false => split($log, ','),
+ default => $log,
+ }
+
+ file { "${puppi::params::logsdir}/${name}":
+ ensure => 'present',
+ mode => '0644',
+ owner => $puppi::params::configfile_owner,
+ group => $puppi::params::configfile_group,
+ require => Class['puppi'],
+ content => template('puppi/log.erb'),
+ tag => 'puppi_log',
+ }
+
+}