34 lines
854 B
YAML
34 lines
854 B
YAML
---
|
|
- name: Stop and disable node_exporter service
|
|
ansible.builtin.systemd:
|
|
name: node_exporter
|
|
state: stopped
|
|
enabled: false
|
|
ignore_errors: true
|
|
|
|
- name: Remove systemd unit file for node_exporter
|
|
ansible.builtin.file:
|
|
path: "{{ node_exporter_systemd_unit_path }}"
|
|
state: absent
|
|
|
|
- name: Remove symlink /usr/local/bin/node_exporter
|
|
ansible.builtin.file:
|
|
path: /usr/local/bin/node_exporter
|
|
state: absent
|
|
|
|
- name: Remove node_exporter installation directory
|
|
ansible.builtin.file:
|
|
path: "{{ node_exporter_install_dir }}"
|
|
state: absent
|
|
|
|
- name: Remove user "{{ node_exporter_user }}"
|
|
ansible.builtin.user:
|
|
name: "{{ node_exporter_user }}"
|
|
state: absent
|
|
remove: true
|
|
|
|
- name: Remove group "{{ node_exporter_group }}"
|
|
ansible.builtin.group:
|
|
name: "{{ node_exporter_group }}"
|
|
state: absent
|