# file: ./requirements.yml
collections:
- name: git@github.com:ngine-io/ansible-collection-hashi.git
type: git
version: master
NOTE: Configuring the firewalld/iptables is not part of the collection.
[consul:children]
nomad
[nomad:children]
nomad_servers
nomad_clients
[nomad_servers]
nomad-server[1:3]
[nomad_clients]
nomad-client[1:5]
# file: ./group_vars/nomad.yml
nomad__use_consul: true
# file: ./group_vars/nomad_clients.yml
---
consul__role: client
nomad__roles:
- client
# file: ./group_vars/nomad_servers.yml
---
consul__role: server
nomad__node_class: server
nomad__roles:
- server
# Optional: also be a client
# - client
# file: ./playbooks/nomad.yml
---
- hosts: nomad_servers
- hosts: nomad_servers
serial: 1
roles:
- role: ngine_io.hashi.consul
tags: consul
- role: ngine_io.hashi.nomad
tags: nomad
- hosts: nomad_clients
serial:
- 1
- 30%
roles:
# Install docker for docker workloads
# - role: geerlingguy.docker
# tags: docker
- role: ngine_io.hashi.consul
tags: consul
- role: ngine_io.hashi.cni
tags: cni
- role: ngine_io.hashi.nomad
tags: nomad
- hosts: nomad_servers[0]
vars:
nomad_job__job_templates:
- name: http-echo
path: http-echo.nomad
- name: traefik
path: traefik.nomad
roles:
- role: ngine_io.hashi.nomad_job
tags: nomad_job
# file: ./playbooks/nomad_upgrade.yml
---
- hosts: nomad_servers
serial: 1
roles:
- role: ngine_io.hashi.nomad_upgrade
tags: nomad
- hosts: nomad_clients
serial:
- 1
- 30%
roles:
- role: ngine_io.hashi.nomad_upgrade
tags: nomad