fail2ban: Switch to ansible.builtin.systemd module
This commit is contained in:
parent
d822f8544d
commit
25846e32f0
2 changed files with 7 additions and 2 deletions
|
@ -18,7 +18,8 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
- name: restart fail2ban service
|
- name: restart fail2ban service
|
||||||
service:
|
systemd:
|
||||||
name: "fail2ban"
|
name: "fail2ban"
|
||||||
state: "restarted"
|
state: "restarted"
|
||||||
|
daemon_reload: true
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -71,9 +71,13 @@
|
||||||
notify: restart fail2ban service
|
notify: restart fail2ban service
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: Ensure fail2ban service is enabled and started.
|
- name: Ensure fail2ban service is enabled and started.
|
||||||
service:
|
systemd:
|
||||||
name: fail2ban
|
name: fail2ban
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
daemon_reload: true
|
||||||
become: true
|
become: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue