Skip to content

Commit

Permalink
Merge pull request #4 from Yannik/upstream
Browse files Browse the repository at this point in the history
Add missing pidfile definition which caused logrotate errors
  • Loading branch information
otakup0pe authored May 11, 2017
2 parents b80e378 + 9b98e5d commit 3b4d788
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fail2ban_logtarget: "/var/log/fail2ban.log"
fail2ban_syslog_target: "/var/log/fail2ban.log"
fail2ban_syslog_facility: 1
fail2ban_socket: /var/run/fail2ban/fail2ban.sock
fail2ban_pidfile: /var/run/fail2ban/fail2ban.pid

fail2ban_ignoreip: "127.0.0.1/8"
fail2ban_bantime: 600
Expand Down
16 changes: 11 additions & 5 deletions templates/etc_fail2ban_fail2ban.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
# 4 = DEBUG
# Values: NUM Default: 3
#
loglevel = {{fail2ban_loglevel}}
loglevel = {{ fail2ban_loglevel }}

# Option: logtarget
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
# Only one log target can be specified.
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log
#
logtarget = {{fail2ban_logtarget}}
logtarget = {{ fail2ban_logtarget }}
{% if fail2ban_logtarget == "SYSLOG" %}
syslog-target = {{fail2ban_syslog_target}}
syslog-facility = {{fail2ban_syslog_facility}}
syslog-target = {{ fail2ban_syslog_target }}
syslog-facility = {{ fail2ban_syslog_facility }}
{% endif %}

# Option: socket
Expand All @@ -34,5 +34,11 @@ syslog-facility = {{fail2ban_syslog_facility}}
# communicate with the server afterwards.
# Values: FILE Default: /var/run/fail2ban/fail2ban.sock
#
socket = {{fail2ban_socket}}
socket = {{ fail2ban_socket }}

# Option: pidfile
# Notes.: Set the PID file. This is used to store the process ID of the
# fail2ban server.
# Values: [ FILE ] Default: /var/run/fail2ban/fail2ban.pid
#
pidfile = {{ fail2ban_pidfile }}

0 comments on commit 3b4d788

Please sign in to comment.