Changes for Service removal when uninstalling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user