Files
ansible_role_proxmox_provision/handlers/main.yml
Jose 674f014be3
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 7s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
feat : Add conditional execution for reloading PVE firewall
This commit introduces a new feature that allows conditional execution of the PVE firewall reload command based on certain conditions, enhancing flexibility and control over firewall management.
2026-02-24 18:56:02 +01:00

44 lines
874 B
YAML

---
# ansible_role_proxmox_provision/handlers/main.yml
# Handlers for role
# ==================
- name: Run apt update
ansible.builtin.apt:
update_cache: yes
- name: Restart pveproxy
ansible.builtin.systemd:
name: pveproxy
state: restarted
- name: Restart logrotate
ansible.builtin.service:
name: logrotate
state: restarted
become: true
- name: Restart log2ram
ansible.builtin.systemd:
name: log2ram
state: restarted
enabled: yes
- name: Restart journald
ansible.builtin.systemd:
name: systemd-journald
state: restarted
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
- name: Restart fail2ban
ansible.builtin.systemd:
name: fail2ban
state: reloaded
- name: Reload pve firewall
ansible.builtin.command: pve-firewall reload
when: fw_compile_check.rc == 0
changed_when: false