From 7ab4b0b7aa0d5d9a298b9c9c1efedfe8741f43c4 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 13 Apr 2016 10:15:27 +0300 Subject: [PATCH] ejabberd: Add option to disable room logging by default --- ejabberd/manifests/init.pp | 4 ++++ ejabberd/templates/ejabberd.cfg.erb | 2 +- ejabberd/templates/ejabberd.yml.erb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ejabberd/manifests/init.pp b/ejabberd/manifests/init.pp index 04b44d4..7da8982 100644 --- a/ejabberd/manifests/init.pp +++ b/ejabberd/manifests/init.pp @@ -31,6 +31,9 @@ # $muclog_datadir: # Path where to store chatroom logs. Disabled by default. # +# $muclog_default: +# Enable room logging by default. Defaults to true. +# # $muclog_format: # Chatroom log format. Valid values html or plaintext. # @@ -74,6 +77,7 @@ class ejabberd( $extauth=undef, $extauth_cache=false, $muclog_datadir=undef, + $muclog_default=true, $muclog_format='plaintext', $ssl_key="${::puppet_ssldir}/private_keys/${::homename}.pem", $ssl_cert="${::puppet_ssldir}/certs/${::homename}.pem", diff --git a/ejabberd/templates/ejabberd.cfg.erb b/ejabberd/templates/ejabberd.cfg.erb index a802075..83301dc 100644 --- a/ejabberd/templates/ejabberd.cfg.erb +++ b/ejabberd/templates/ejabberd.cfg.erb @@ -558,7 +558,7 @@ user, host = admin.split("@") -%> {allow_user_invites, true}, {anonymous, false}, {public, false}, -<% if @muclog_datadir -%> +<% if @muclog_datadir and @muclog_default == true -%> {logging, true}, <% else -%> {logging, false}, diff --git a/ejabberd/templates/ejabberd.yml.erb b/ejabberd/templates/ejabberd.yml.erb index 2b22d4f..dc3b2e5 100644 --- a/ejabberd/templates/ejabberd.yml.erb +++ b/ejabberd/templates/ejabberd.yml.erb @@ -185,7 +185,7 @@ modules: default_room_options: allow_user_invites: true anonymous: false -<% if @muclog_datadir -%> +<% if @muclog_datadir and @muclog_default == true -%> logging: true <% else -%> logging: false