diff --git a/contrib/os-services/roles/prepare/tasks/main.yml b/contrib/os-services/roles/prepare/tasks/main.yml index 9d8881bbb..e95dcef15 100644 --- a/contrib/os-services/roles/prepare/tasks/main.yml +++ b/contrib/os-services/roles/prepare/tasks/main.yml @@ -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'"