dev/provisioning/modules/puppi/manifests/log.pp
author ymh <ymh.work@gmail.com>
Tue, 19 Jan 2016 19:18:34 +0100
changeset 109 d22ed5792f8e
parent 28 b0b56e0f8c7f
permissions -rwxr-xr-x
Correct transaction management. cf. bug https://openrdf.atlassian.net/browse/SES-2295 and tomcat default management of PUT request with form data (application/x-www-form-urlencoded encoded)

# 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',
  }

}