ansible/roles/common/handlers/main.yaml

29 lines
584 B
YAML

---
- name: Update grub
ansible.builtin.command:
cmd: update-grub
- name: Apt update
ansible.builtin.apt:
update_cache: true
- name: Daemon reload
ansible.builtin.systemd:
daemon_reload: true
- name: Reload sshd
ansible.builtin.systemd:
name: ssh
state: reloaded
- name: Reload nginx
ansible.builtin.systemd:
name: nginx
state: reloaded
- name: Persist iptables
ansible.builtin.shell: "{{ item.c }}-save > /etc/iptables/rules.{{ item.ip }}"
with_items:
- { c: iptables, ip: v4 }
- { c: ip6tables, ip: v6 }
when: not nft | bool