diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-03-01 18:18:24 +0100 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-03-01 18:18:24 +0100 |
commit | 08e40e4a45d715a367dbd60e3fe89553ce479d2c (patch) | |
tree | 6b4e8b57c6b485c83f88e838c71c093a76b7f941 /tasks/uninstall.yml | |
download | ansible-netdata_straight-08e40e4a45d715a367dbd60e3fe89553ce479d2c.tar.gz ansible-netdata_straight-08e40e4a45d715a367dbd60e3fe89553ce479d2c.tar.zst ansible-netdata_straight-08e40e4a45d715a367dbd60e3fe89553ce479d2c.zip |
initial import from private repo
Diffstat (limited to 'tasks/uninstall.yml')
-rw-r--r-- | tasks/uninstall.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml new file mode 100644 index 0000000..1b2c4b9 --- /dev/null +++ b/tasks/uninstall.yml | |||
@@ -0,0 +1,13 @@ | |||
1 | - name: Check uninstaller presence | ||
2 | stat: | ||
3 | path: "{{ item }}/netdata-uninstaller.sh" | ||
4 | loop: | ||
5 | - /usr/libexec/netdata | ||
6 | - /opt/netdata/usr/libexec/netdata | ||
7 | register: uninstaller_presence | ||
8 | |||
9 | - name: Uninstall | ||
10 | command: "{{ item }} --yes --force" # noqa 301 | ||
11 | loop: "{{ uninstallers }}" | ||
12 | vars: | ||
13 | uninstallers: "{{ uninstaller_presence.results | selectattr('stat.exists') | map(attribute='invocation.module_args.path') | list }}" | ||