Skip to content

Commit

Permalink
Fix #1236 - Fixes removal of wrong include directory (#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
Japje committed Jun 22, 2024
1 parent b0f05b4 commit 3f38086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/pr_1302_wrong_include_dir_removal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- Fix for removal of wrong agent include directory (https://github.com/ansible-collections/community.zabbix/issues/1236)
6 changes: 3 additions & 3 deletions roles/zabbix_agent/tasks/remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- name: 'Remove | Make sure the "old" zabbix-agent service stopped'
ansible.builtin.service:
name: "zabbix-agent"
name: "{{ zabbix_agent_service | replace('agent2', 'agent') }}"
state: stopped
enabled: false
become: true
Expand All @@ -14,12 +14,12 @@
- name: "Remove | Package removal"
ansible.builtin.package:
name: "zabbix-agent"
name: "{{ zabbix_agent_package | replace('agent2', 'agent') }}"
state: absent
become: true

- name: "Remove | Remove the agent-include-dir"
ansible.builtin.file:
path: "{{ zabbix_agent_include }}"
path: "{{ zabbix_agent_include | replace('agent2', 'agent') }}"
state: absent
become: true

0 comments on commit 3f38086

Please sign in to comment.