Alan Orth
ffe7a872dd
According to Ansible we can use yes, true, True, "or any quoted st- ring" for a boolean true, but ansible-lint wants us to use either true or false. See: https://chronicler.tech/red-hat-ansible-yes-no-and/
24 lines
771 B
YAML
24 lines
771 B
YAML
---
|
|
# ansible.builtin.file: roles/common/handlers/main.yml
|
|
|
|
- name: reload sshd
|
|
ansible.builtin.systemd: name={{ sshd_service_name }} state=reloaded
|
|
|
|
- name: reload sysctl
|
|
command: sysctl -p /etc/sysctl.conf
|
|
|
|
- name: restart firewalld
|
|
ansible.builtin.systemd: name=firewalld state=restarted
|
|
|
|
- name: reload systemd
|
|
ansible.builtin.systemd: daemon_reload=true
|
|
|
|
- name: restart nftables
|
|
ansible.builtin.systemd: name=nftables state=restarted
|
|
|
|
# 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
|
|
ansible.builtin.systemd: name=fail2ban state=restarted
|