Oefenweb / ansible-fail2ban

Ansible role to set up fail2ban in Debian-like systems
MIT License
117 stars 55 forks source link

Move custom configurations management to dedicated tasksets #65

Open jpiron opened 3 years ago

jpiron commented 3 years ago

This allows to use the tasks_from parameter of the import_role module. For instance, one could run something like :

- name: "Create Traefik fail2ban configuration."
  import_role:
    name: ansible-fail2ban
    tasks_from: copy_custom_configurations
  become: True
  vars:
    fail2ban_filterd_path: "{{ traefik_fail2ban_filterd_path }}"
    fail2ban_actiond_path: "{{ traefik_fail2ban_actiond_path }}"
    fail2ban_jaild_path: "{{ traefik_fail2ban_jaild_path }}"

from a Traefik playbook to just add Traefik specific Fail2ban configuration without reconfiguring everything.