main.yml 358 B

12345678910111213
  1. - name: Install fail2ban
  2. apt:
  3. name: fail2ban
  4. state: latest
  5. notify: fail2ban_restart
  6. - name: Upload jail.local template {{ fail2ban_tmpl }}
  7. template:
  8. src: "../{{ fail2ban_tmpl }}.j2"
  9. dest: "{{ fail2ban_file }}"
  10. owner: "{{ fail2ban_user }}"
  11. group: "{{ fail2ban_group }}"
  12. mode: "{{ fail2ban_mode }}"
  13. notify: fail2ban_restart