dovecot: set Munin config in dedicated file
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2598|6|2592|6|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/301//ansiblelint">Evolix » ansible-roles » unstable #301</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
William Hirigoyen 2023-07-21 16:33:15 +02:00
parent ef642e564e
commit 1a1d4265a7
2 changed files with 10 additions and 18 deletions

View file

@ -0,0 +1,6 @@
[dovecot1]
user root
[dovecot_stats_*]
user root

View file

@ -44,25 +44,11 @@
mode: "0755"
tags: dovecot_stats_
- name: Sections dovecot1 and dovecot_stats_ are in /etc/munin/plugin-conf.d/zzz-evolinux
ansible.builtin.lineinfile:
path: /etc/munin/plugin-conf.d/zzz-evolinux
regex: '\[{{ item }}\]'
line: '[{{ item }}]'
create: yes
- name: Copy Munin config
ansible.builtin.copy:
src: z-evolinux-dovecot.conf
dest: /etc/munin/plugin-conf.d/z-evolinux-dovecot
mode: '0644'
loop: ['dovecot1', 'dovecot_stats_*']
notify: restart munin-node
- name: User root is set for plugins in /etc/munin/plugin-conf.d/zzz-evolinux
ansible.builtin.lineinfile:
path: /etc/munin/plugin-conf.d/zzz-evolinux
regex: '^[[:blank:]]*user root[[:blank:]]*$'
insertafter: '\[{{ item }}\]'
line: 'user root'
create: yes
mode: '0644'
loop: ['dovecot1', 'dovecot_stats_*']
notify: restart munin-node
- name: Enable dovecot1 plugin