fix not-found service error (#10391)

Signed-off-by: tu1h <lihai.tu@daocloud.io>
This commit is contained in:
Louis Tu
2023-08-25 10:05:17 +08:00
committed by GitHub
parent e573a2f6d4
commit 0932318b85

View File

@ -12,7 +12,7 @@
state: stopped
enabled: no
when:
"'firewalld.service' in services"
"'firewalld.service' in services and services['firewalld.service'].status != 'not-found'"
- name: Disable service ufw
systemd:
@ -20,4 +20,4 @@
state: stopped
enabled: no
when:
"'ufw.service' in services"
"'ufw.service' in services and services['ufw.service'].status != 'not-found'"