Install fail2ban packages: pkg.installed: - pkgs: - fail2ban configure fail2ban.local: file.managed: - name: /etc/fail2ban/fail2ban.local - source: salt://fail2ban/files/fail2ban.local - user: root - group: root - mode: "0644" configure jail.local: file.managed: - name: /etc/fail2ban/jail.local - source: salt://fail2ban/files/jail.local - user: root - group: root - mode: "0644" start fail2ban: service.running: - name: fail2ban - enable: true - watch: - file: configure fail2ban.local - file: configure jail.local