Skip to content

Commit

Permalink
ci(kitchen): use fail2ban.ng in state_top (saltstack-formulas#35)
Browse files Browse the repository at this point in the history
* Semi-automated using myii/ssf-formula#118
* Fix `ng:lookup` to use values that actually work
  • Loading branch information
myii committed Jan 10, 2020
1 parent da81c59 commit b826d28
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ suites:
base:
'*':
- misc.fake_log_files
- fail2ban
- fail2ban.ng
pillars:
top.sls:
base:
Expand Down
34 changes: 20 additions & 14 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ fail2ban:
#
ng:
lookup:
prefix: '/opt'
package: 'fail2ban-new-package'
loglevel: ERROR
bantime: 600
maxretry: 3
backend: auto

# fail2ban.local
config:

# FTP-style
source_path: salt://path-to-fail2ban-file
# # FTP-style
# source_path: salt://path-to-fail2ban-file

# Template-style
loglevel: ERROR
Expand All @@ -60,8 +62,8 @@ fail2ban:
# jail.local
jails:

# FTP-style
source_path: salt://path-to-jail-file
# # FTP-style
# source_path: salt://path-to-jail-file

# Template-style
DEFAULT:
Expand Down Expand Up @@ -95,10 +97,12 @@ fail2ban:
actionban: csf -d <ip> Added by Fail2Ban for <name>
actionunban: csf -dr <ip>

# FTP-style
test-action:
config:
source_path: salt://path-to-action-file
# yamllint disable rule:comments-indentation
# # FTP-style
# test-action:
# config:
# source_path: salt://path-to-action-file
# yamllint enable rule:comments-indentation

# filter.d
filters:
Expand All @@ -112,7 +116,9 @@ fail2ban:
Definition:
failregex: <HOST>.*(GET|POST).*(\.php|\.asp|\.exe|\.pl|\.cgi|\.scgi).*

# FTP-style
test-filter:
config:
source_path: salt://path-to-filter-file
# yamllint disable rule:comments-indentation
# # FTP-style
# test-filter:
# config:
# source_path: salt://path-to-filter-file
# yamllint enable rule:comments-indentation

0 comments on commit b826d28

Please sign in to comment.