ansible-roles/fail2ban/tasks/fix-dbpurgeage.yml
Bruno TATU e0c95b4c78
All checks were successful
continuous-integration/drone/push Build is passing
Ensure apply dbpurgeage from stretch and buster for fail2ban
2022-07-08 11:26:00 +02:00

20 lines
495 B
YAML

- name: Sqlite needed
ansible.builtin.apt:
name:
- sqlite3
state: present
- name: Register bantime from default config from package
shell: "grep -R -E 'dbpurgeage[[:blank:]]*=[[:blank:]]*[0-9]+' /etc/fail2ban/fail2ban.conf |awk '{print $3}'|head -n1"
register: default_dbpurgeage
changed_when: false
check_mode: false
- name: Add crontab
template:
src: fail2ban_dbpurge.j2
dest: /etc/cron.daily/fail2ban_dbpurge
mode: 0700
owner: root
group: root