hcp-ansible/playbooks/deploy.yml
Bertrand Lanson 30adf2ba7a
All checks were successful
development / Check commit compliance (push) Successful in 34s
feat: add global variables for nomad deployment
2024-05-16 17:25:41 +02:00

50 lines
1.2 KiB
YAML

---
# hashistack deployment playbook
- name: "Deploy"
hosts: all
strategy: linear
gather_facts: true
become: true
tasks:
- name: "Import variables"
ansible.builtin.import_tasks:
file: tasks/load_vars.yml
tags:
- always
- name: "Deploy Consul Control Plane"
ansible.builtin.import_tasks:
file: tasks/consul/consul_deploy.yml
when:
- enable_consul | bool
- "'consul_servers' in group_names"
tags:
- consul
- name: "Deploy Consul Agents"
ansible.builtin.include_role:
name: ednz_cloud.hashicorp_consul
when:
- enable_consul | bool
- "'consul_agents' in group_names"
tags:
- consul
- name: "Deploy Haproxy & Keepalived"
ansible.builtin.import_tasks:
file: tasks/haproxy/haproxy_deploy.yml
when:
- enable_haproxy | bool
- "'haproxy_servers' in group_names"
tags:
- haproxy
- name: "Deploy Vault"
ansible.builtin.import_tasks:
file: tasks/vault/vault_deploy.yml
when:
- enable_vault | bool
- "'vault_servers' in group_names"
tags:
- vault