--- - name: Verify hosts: all tasks: - name: Populate service facts ansible.builtin.service_facts: - name: Check if keycloak service started assert: that: - ansible_facts.services["keycloak.service"]["state"] == "running"