Skip to content
Snippets Groups Projects
Commit 3f2bea08 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: resolves GitLab issue 2368...

feat: resolves GitLab issue 2368 (https://git.slub-dresden.de/import-jira-projekte/referat_2.3/-/issues/2368) by making sure that all ClamAV components are uninstalled
parent c63e7bd7
No related branches found
No related tags found
No related merge requests found
Pipeline #6703 failed
......@@ -75,7 +75,3 @@
- name: cleanup remainders of METS-based SubApp
ansible.builtin.import_tasks: "cleanup_legacy.yml"
tags: [cleanup]
- name: remove not required packages
ansible.builtin.import_tasks: "remove_packages.yml"
tags: [cleanup]
---
### PAKETDEINSTALLATIONEN ###
- name: clamav entfernen
block:
# This cannot be done using the `systemd` module, so we ignore the linter
# warning.
- name: clamav Prüfung # noqa command-instead-of-module
# command: systemctl list-unit-files | grep clam
ansible.builtin.command: systemctl list-unit-files clamav-daemon.service clamav-freshclam.service
register: check_clamav_installed
failed_when:
- ( "0 unit files listed." not in check_clamav_installed.stdout )
- ( check_clamav_installed.rc != 0 )
changed_when:
- ( "0 unit files listed." not in check_clamav_installed.stdout )
- ( check_clamav_installed.rc != 0 )
- name: clamav Deinstallation
when:
- ( "0 unit files listed." not in check_clamav_installed.stdout )
block:
- name: clamav systemd Services deaktivieren
ansible.builtin.systemd:
name: "{{ item }}"
enabled: false
state: stopped
loop:
- 'clamav-daemon.service'
- 'clamav-freshclam.service'
# ignore_errors: true
- name: clamav Pakete deinstallieren
ansible.builtin.apt:
name:
- 'clamav'
- 'clamav-base'
- 'clamav-freshclam'
state: absent
purge: true
autoremove: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment