fail2ban: Switch to ansible.builtin.systemd module

This commit is contained in:
histalek 2021-12-05 14:54:04 +01:00
parent d822f8544d
commit 25846e32f0
No known key found for this signature in database
GPG key ID: ED1D6449704FDE03
2 changed files with 7 additions and 2 deletions

View file

@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
- name: restart fail2ban service
service:
systemd:
name: "fail2ban"
state: "restarted"
daemon_reload: true
become: true

View file

@ -71,9 +71,13 @@
notify: restart fail2ban service
become: true
- name: Flush handlers
meta: flush_handlers
- name: Ensure fail2ban service is enabled and started.
service:
systemd:
name: fail2ban
state: started
enabled: true
daemon_reload: true
become: true