hcp-ansible/roles/hashicorp_nomad/handlers/main.yml

21 lines
464 B
YAML

---
# handlers file for hashicorp_nomad
- name: "Reload systemd file"
ansible.builtin.systemd:
daemon_reload: true
listen: "systemctl-daemon-reload"
- name: "Enable nomad service"
ansible.builtin.service:
name: nomad
enabled: true
listen: "systemctl-enable-nomad"
- name: "Start nomad service"
ansible.builtin.service:
name: nomad
state: restarted
listen: "systemctl-restart-nomad"
throttle: 1
when: hashi_nomad_start_service