Skip to content

Instantly share code, notes, and snippets.

@loe
Created March 31, 2011 23:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save loe/897481 to your computer and use it in GitHub Desktop.
Save loe/897481 to your computer and use it in GitHub Desktop.
class rsyslog {
include logrotate::rsyslog
package { 'rsyslog':
ensure => installed
}
service { 'rsyslog':
ensure => running
}
$papertrail_port = $environment ? {
'staging' => '1111',
'master' => '2222',
'skunkworks' => '3333',
default => '4444'
}
file { '/etc/rsyslog.d/papertrail.conf':
content => template('rsyslog/papertrail.conf.erb'),
require => Package['rsyslog'],
notify => Service['rsyslog']
}
}
*.* @logs.papertrailapp.com:<%= scope.lookupvar("rsyslog::papertrail_port") %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment