From 6426d8afcd21bf7b9f720bc061d108de8fb7e8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20-=20Le=20Filament?= <theo@le-filament.com> Date: Tue, 28 Mar 2023 16:06:06 +0200 Subject: [PATCH] change(fail2ban): adapt sudoers commands to new script --- templates/sudoers.j2 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/sudoers.j2 b/templates/sudoers.j2 index 888196a..802f0ee 100644 --- a/templates/sudoers.j2 +++ b/templates/sudoers.j2 @@ -11,11 +11,8 @@ root ALL=(ALL:ALL) ALL {{ host_user }} ALL=(ALL) ALL {% if host_user2 is defined %}{{ host_user2 }} ALL=(ALL) ALL{% endif %} -nagios ALL=NOPASSWD: /usr/bin/fail2ban-client status -nagios ALL=NOPASSWD: /usr/bin/fail2ban-client status * -nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * banip -nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * banip --with-time -nagios ALL=NOPASSWD: /usr/bin/fail2ban-client get * bantime +nagios ALL=NOPASSWD: /usr/bin/fail2ban-client banned +nagios ALL=NOPASSWD: /usr/bin/fail2ban-client ping nagios ALL=NOPASSWD: /usr/bin/docker ps --format {{ '{{' }}.Names{{ '}}' }} --filter name=* --no-trunc --quiet --all nagios ALL=NOPASSWD: /usr/bin/docker ps --format {{ '{{' }}.Names{{ '}}' }} --filter name=* --no-trunc --quiet nagios ALL=NOPASSWD: /usr/bin/docker stats --format {{ '{{' }}.Name{{ '}}' }}\:{{ '{{' }}.CPUPerc{{ '}}' }}\:{{ '{{' }}.MemPerc{{ '}}' }} --no-stream -- GitLab