Skip to content

Commit

Permalink
Merge pull request #27 from j4m3s/26-dont-overwrite-fail2banconf
Browse files Browse the repository at this point in the history
Change fail2ban.conf to fail2ban.local
  • Loading branch information
tersmitten authored Oct 25, 2016
2 parents 74dad1b + 70754d9 commit ecf2e92
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 49 deletions.
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- fail2ban
- fail2ban-install

- name: update configuration file - /etc/fail2ban/fail2ban.conf
- name: update configuration file - /etc/fail2ban/fail2ban.local
template:
src: etc/fail2ban/fail2ban.conf.j2
dest: /etc/fail2ban/fail2ban.conf
src: etc/fail2ban/fail2ban.local.j2
dest: /etc/fail2ban/fail2ban.local
owner: root
group: root
mode: 0644
Expand Down
46 changes: 0 additions & 46 deletions templates/etc/fail2ban/fail2ban.conf.j2

This file was deleted.

19 changes: 19 additions & 0 deletions templates/etc/fail2ban/fail2ban.local.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# {{ ansible_managed }}

# Overrides values from the fail2ban.conf configuration file.
#
# For comments relating to each setting see fail2ban.conf

[Definition]

loglevel = {{ fail2ban_loglevel }}
logtarget = {{ fail2ban_logtarget }}

{% if fail2ban_logtarget == "SYSLOG" %}
syslog-target = {{ fail2ban_syslog_target }}
syslog-facility = {{ fail2ban_syslog_facility }}
{% endif %}

socket = {{ fail2ban_socket }}

pidfile = {{ fail2ban_pidfile }}

0 comments on commit ecf2e92

Please sign in to comment.