From 4836f747ae11b81896d80cbcd39bcb9ba0f9fe12 Mon Sep 17 00:00:00 2001 From: Respheal Date: Thu, 10 Sep 2020 14:54:04 -0400 Subject: [PATCH] Older logging syntax for Debian 9/Ubuntu 16 --- templates/monitrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/monitrc b/templates/monitrc index 9806968..6838056 100644 --- a/templates/monitrc +++ b/templates/monitrc @@ -1,5 +1,12 @@ set daemon 30 # check services at 30 seconds intervals + +{% if ansible_os_family == "Debian" + and (ansible_distribution_major_version == "9" + or ansible_distribution_major_version == "16.04") %} +set logfile /var/log/monit.log +{% else %} set log /var/log/monit.log +{% endif %} set eventqueue basedir /var/monit # set the base directory where events will be stored slots 100 # optionally limit the queue size