Bertrand Lanson
259f273fd9
All checks were successful
development / Check commit compliance (push) Successful in 5s
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
---
|
|
# hashistack deployment playbook
|
|
- name: "Deploy"
|
|
hosts: "{{ target | default('all, !deployment') }}"
|
|
strategy: linear
|
|
gather_facts: true
|
|
any_errors_fatal: true
|
|
become: true
|
|
tasks:
|
|
- name: "Import variables"
|
|
ansible.builtin.include_role:
|
|
name: ednz_cloud.hashistack.hashistack
|
|
tags:
|
|
- always
|
|
|
|
# Consul nodes deployment
|
|
- name: "Deploy Consul"
|
|
tags:
|
|
- consul
|
|
when:
|
|
- enable_consul | bool
|
|
ansible.builtin.include_tasks:
|
|
file: tasks/consul/consul_deploy.yml
|
|
|
|
# Vault nodes deployment
|
|
- name: "Deploy Vault"
|
|
tags:
|
|
- vault
|
|
when:
|
|
- enable_vault | bool
|
|
ansible.builtin.include_tasks:
|
|
file: tasks/vault/vault_deploy.yml
|
|
|
|
# Nomad nodes deployment
|
|
- name: "Deploy Nomad"
|
|
tags:
|
|
- nomad
|
|
when:
|
|
- enable_nomad | bool
|
|
ansible.builtin.include_tasks:
|
|
file: tasks/nomad/nomad_deploy.yml
|
|
|
|
# - fail:
|
|
# Haproxy nodes deployment
|
|
# - name: "Deploy Proxies"
|
|
# tags:
|
|
# - haproxy
|
|
# when:
|
|
# - enable_haproxy | bool
|
|
# block:
|
|
# - name: "Deploy Haproxy & Keepalived"
|
|
# ansible.builtin.import_tasks:
|
|
# file: tasks/haproxy/haproxy_deploy.yml
|
|
# when:
|
|
# - "'haproxy_servers' in group_names"
|