Ansible-Roles/roles/zabbix-agent2/tasks/custom_user_clean_linux.yml
2026-05-08 22:12:36 +03:00

20 lines
557 B
YAML

---
# Assure systemd override of custom user is absent
- name: "Clean custom user : Systemd : Remove overrides"
become: true
notify:
- Reload systemd daemon
- Service restart
ansible.builtin.file:
path: "{{ item_path }}"
state: absent
loop: "{{ agent_internal_clean_path_list }}"
loop_control:
loop_var: item_path
# register: zabbix_agent_overrides
vars:
agent_internal_clean_path_list:
- "{{ agent_systemd_override_path }}"
# - '{{ agent_logrotate_path[agent_variant | string] }}'
tags: [deploy, config]