Elukey has uploaded a new change for review. https://gerrit.wikimedia.org/r/315122
Change subject: Add documentation to systemd::syslog and an optional filepath variable ...................................................................... Add documentation to systemd::syslog and an optional filepath variable Change-Id: I7f10206ae6015991c075d45b2a7cb9a502911141 --- M modules/systemd/manifests/syslog.pp 1 file changed, 36 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/315122/1 diff --git a/modules/systemd/manifests/syslog.pp b/modules/systemd/manifests/syslog.pp index 5a468c0..be4d469 100644 --- a/modules/systemd/manifests/syslog.pp +++ b/modules/systemd/manifests/syslog.pp @@ -1,8 +1,36 @@ +# == systemd::syslog == +# +# Configures logging via rsyslog and logrotate for systemd units. +# +# === Paramenters === +# +# [*base_dir*] +# Base directory path for the logging directory. The 'title' will be appended +# to form the final string value (example: 'title' => 'servicebla', +# log dir => /var/log/servicebla) +# Default: '/var/log' +# +# [*owner*] +# User owner of the final logging directory. +# +# [*group*] +# Group owner of the final logging directory. +# +# [*readable_by*] +# Establish the File permissions assigned to the final logging directory. +# Options available: 'user' (0600), 'group' (0640), all '0644' +# Default: 'group' +# +# [*logfilename*] +# Filename of the logging file. +# Default: 'syslog.log' +# define systemd::syslog( - $base_dir='/var/log', - $owner=$title, - $group=$title, - $readable_by='group' + $base_dir = '/var/log', + $owner = $title, + $group = $title, + $readable_by = 'group' + $log_filename = 'syslog.log' ) { if $::initsystem != 'systemd' { fail('systemd::syslog is useful only with systemd') @@ -11,13 +39,13 @@ # File permissions $dirmode = '0755' $filemode = $readable_by ? { - 'user' => '0600', - 'group' =>'0640', - 'all' => '0644' + 'user' => '0600', + 'group' => '0640', + 'all' => '0644' } $local_logdir = "${base_dir}/${title}" - $local_syslogfile = "${local_logdir}/syslog.log" + $local_syslogfile = "${local_logdir}/${log_filename}" if ! defined(File[$local_logdir]) { file { $local_logdir: -- To view, visit https://gerrit.wikimedia.org/r/315122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f10206ae6015991c075d45b2a7cb9a502911141 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Elukey <ltosc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits