2014-08-17 00:35:57 +03:00
|
|
|
---
|
2022-09-10 18:09:12 +03:00
|
|
|
# ansible.builtin.file: roles/common/handlers/main.yml
|
2014-08-17 00:35:57 +03:00
|
|
|
|
2015-08-23 00:01:17 +03:00
|
|
|
- name: reload sshd
|
2023-08-23 21:35:28 +03:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: "{{ sshd_service_name }}"
|
|
|
|
state: reloaded
|
2014-08-17 00:35:57 +03:00
|
|
|
|
|
|
|
- name: reload sysctl
|
|
|
|
command: sysctl -p /etc/sysctl.conf
|
2015-06-07 12:42:03 +03:00
|
|
|
|
2019-10-26 16:36:07 +02:00
|
|
|
- name: reload systemd
|
2023-08-23 21:35:28 +03:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
daemon_reload: true
|
2021-07-26 13:09:41 +03:00
|
|
|
|
2021-09-05 16:19:31 +03:00
|
|
|
- name: restart nftables
|
2023-08-23 21:35:28 +03:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: nftables
|
|
|
|
state: restarted
|
2021-09-28 10:45:51 +03:00
|
|
|
|
|
|
|
# 2021-09-28: note to self to keep fail2ban at the end, as handlers are executed
|
|
|
|
# in the order they are defined, not in the order they are listed in the task's
|
|
|
|
# notify statement and we must restart fail2ban after updating the firewall.
|
|
|
|
- name: restart fail2ban
|
2023-08-23 21:35:28 +03:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: fail2ban
|
|
|
|
state: restarted
|