Changes for Service removal when uninstalling

This commit is contained in:
2026-03-16 22:57:11 -04:00
parent c65828ef87
commit 14b030a138

View File

@@ -83,6 +83,17 @@
purge: true
when: zabbix_state == 'absent'
- name: Reload systemd to drop the removed unit file
ansible.builtin.systemd:
daemon_reload: true
when: zabbix_state == 'absent'
- name: Clear any lingering systemd state for zabbix-agent2
ansible.builtin.command: systemctl reset-failed zabbix-agent2
when: zabbix_state == 'absent'
ignore_errors: true
changed_when: false
- name: Remove Zabbix configuration directory
ansible.builtin.file:
path: /etc/zabbix