hcp-ansible/playbooks/tasks/nomad/nomad_deploy.yml
Bertrand Lanson 7f8d8654a4
All checks were successful
development / Check commit compliance (push) Successful in 6s
feat(deployment): Implement new structure for deploying components
This allows operators to target specific groups when deploying using the --tags flag of ansible. You can, for now, target consul, consul_servers, consul_agents, nomad, nomad_servers, nomad_clients, vault and haproxy
2024-07-14 16:15:21 +02:00

20 lines
477 B
YAML

---
- name: "Nomad"
block:
- name: "Deploy Nomad Control Plane"
ansible.builtin.import_tasks:
file: nomad_control_plane.yml
when:
- "'nomad_servers' in group_names"
tags:
- nomad_servers
- name: "Deploy Nomad Clients"
ansible.builtin.import_tasks:
file: nomad_clients.yml
when:
- "'nomad_clients' in group_names"
- "'nomad_servers' not in group_names"
tags:
- nomad_clients