diff --git a/tasks/remove_packages.yml b/tasks/remove_packages.yml index 69848505b9036f0103a4702a4967156869047b5d..2de71d497774eb86e25de6af68920181cae1c014 100644 --- a/tasks/remove_packages.yml +++ b/tasks/remove_packages.yml @@ -6,6 +6,12 @@ #command: systemctl list-unit-files | grep clam 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 block: - name: clamav systemd Services deaktivieren @@ -27,4 +33,4 @@ purge: true autoremove: yes when: - - ( "0 unit files listed." not in check_clamav_installed.stdout ) \ No newline at end of file + - ( "0 unit files listed." not in check_clamav_installed.stdout )