ansible-nas/roles/nomad/molecule/default/verify.yml

21 lines
582 B
YAML

---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
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"