--- - name: Verify hosts: all gather_facts: false tasks: - ansible.builtin.include_vars: file: ../../defaults/main.yml - name: Get Nomad service state ansible.builtin.systemd: name: "{{ nomad_service_name }}" state: started register: service_result - name: Check that Nomad service is running ansible.builtin.assert: that: - service_result.status['ActiveState'] == "active" - service_result.status['Result'] == "success" - service_result.state == "started"