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

fix: check for command return codes to control behaviour

parent 1e9cb6bc
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment