2023-03-09 20:47:42 +00:00
|
|
|
---
|
|
|
|
- name: Verify
|
|
|
|
hosts: all
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2023-04-12 22:22:52 +00:00
|
|
|
- ansible.builtin.include_vars:
|
2023-03-09 20:47:42 +00:00
|
|
|
file: ../../defaults/main.yml
|
|
|
|
|
|
|
|
- name: Get Nomad service state
|
|
|
|
ansible.builtin.systemd:
|
2023-03-28 11:09:42 +00:00
|
|
|
name: "{{ nomad_service_name }}"
|
2023-03-09 20:47:42 +00:00
|
|
|
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"
|