dovecot: fix plugin dovecot1
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2668|4|2664|5|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/445//ansiblelint">Evolix » ansible-roles » unstable #445</a> Details
gitea/ansible-roles/pipeline/head This commit looks good Details

This commit is contained in:
William Hirigoyen 2024-01-09 17:13:22 +01:00
parent e089796c4c
commit f5d5e84caf
6 changed files with 19 additions and 12 deletions

View File

@ -82,6 +82,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* webapps/nextcloud: fix missing gid
* nginx: fix mistake between "check_mode: no" and "when: not ansible_check_mode" (fail in check mode)
* nginx: add "when: not ansible_check_mode" in various tasks to prevent fail in check mode
* dovecot: fix plugin dovecot1
### Removed

View File

@ -1,4 +1,6 @@
---
log2mail_alert_email: Null
dovecot_vmail_uid: 5000
dovecot_vmail_gid: 5000

24
dovecot/files/munin_plugin_dovecot1 Normal file → Executable file
View File

@ -53,15 +53,17 @@ if ( $ARGV[0] and $ARGV[0] eq "autoconf" ) {
exit 0;
}
if (-f "$logfile.0") {
$rotlogfile = $logfile . ".0";
} elsif (-f "$logfile.1") {
$rotlogfile = $logfile . ".1";
} elsif (-f "$logfile.01") {
$rotlogfile = $logfile . ".01";
} else {
$rotlogfile = $logfile . ".0";
}
# Disable rotated log inpection because name is not deterministic across systems
# and data loss is may 5 min
#if (-f "$logfile.0") {
# $rotlogfile = $logfile . ".0";
#} elsif (-f "$logfile.1") {
# $rotlogfile = $logfile . ".1";
#} elsif (-f "$logfile.01") {
# $rotlogfile = $logfile . ".01";
#} else {
# $rotlogfile = $logfile . ".0";
#}
if ( $ARGV[0] and $ARGV[0] eq "config" ) {
print "multigraph dovecot_connections\n";
@ -179,7 +181,9 @@ if (!defined $pos) {
if ($startsize < $pos) {
# Log rotated
parseDovecotfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
# Disable rotated log inpection because name is not deterministic across systems
# and data loss is may 5 min
#parseDovecotfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
$pos = 0;
}

View File

@ -60,7 +60,7 @@
tags:
- dovecot
- name: deploy evolix config
- name: deploy evolix config for Dovecot
ansible.builtin.template:
src: z-evolinux-defaults.conf.j2
dest: /etc/dovecot/conf.d/z-evolinux-defaults.conf

View File

@ -51,7 +51,7 @@
- name: Copy Munin config
ansible.builtin.copy:
src: z-evolinux-dovecot.conf
src: munin_plugins.conf
dest: /etc/munin/plugin-conf.d/zzz-dovecot
mode: '0644'
notify: restart munin-node