2023-12-15 17:45:58 +00:00
|
|
|
---
|
|
|
|
# hashistack deployment playbook
|
|
|
|
- name: "Deploy"
|
2024-07-14 14:15:21 +00:00
|
|
|
hosts: "{{ target | default('all, !deployment') }}"
|
2024-01-04 21:09:49 +00:00
|
|
|
strategy: linear
|
2023-12-15 17:45:58 +00:00
|
|
|
gather_facts: true
|
2024-07-14 14:15:21 +00:00
|
|
|
any_errors_fatal: true
|
2023-12-24 17:09:08 +00:00
|
|
|
become: true
|
2023-12-15 17:45:58 +00:00
|
|
|
tasks:
|
2024-01-02 22:25:59 +00:00
|
|
|
- name: "Import variables"
|
2024-08-17 12:09:24 +00:00
|
|
|
ansible.builtin.include_role:
|
2024-07-25 20:29:19 +00:00
|
|
|
name: ednz_cloud.hashistack.hashistack
|
2024-08-26 21:10:04 +00:00
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- always
|
2024-04-06 21:47:35 +00:00
|
|
|
tags:
|
|
|
|
- always
|
2024-01-02 22:25:59 +00:00
|
|
|
|
2024-07-14 14:15:21 +00:00
|
|
|
# Consul nodes deployment
|
2024-06-25 13:16:42 +00:00
|
|
|
- name: "Deploy Consul"
|
2024-01-25 21:40:44 +00:00
|
|
|
tags:
|
|
|
|
- consul
|
2024-08-26 21:10:04 +00:00
|
|
|
- consul_servers
|
|
|
|
- consul_agents
|
2024-03-17 18:05:02 +00:00
|
|
|
when:
|
|
|
|
- enable_consul | bool
|
2024-08-17 12:09:24 +00:00
|
|
|
ansible.builtin.include_tasks:
|
2024-07-14 14:15:21 +00:00
|
|
|
file: tasks/consul/consul_deploy.yml
|
2024-08-26 21:10:04 +00:00
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- consul
|
2024-07-14 14:15:21 +00:00
|
|
|
|
|
|
|
# Vault nodes deployment
|
2024-03-13 22:27:12 +00:00
|
|
|
- name: "Deploy Vault"
|
2023-12-30 14:54:37 +00:00
|
|
|
tags:
|
|
|
|
- vault
|
2024-08-26 21:10:04 +00:00
|
|
|
- vault_servers
|
2024-07-14 14:15:21 +00:00
|
|
|
when:
|
|
|
|
- enable_vault | bool
|
2024-08-17 12:09:24 +00:00
|
|
|
ansible.builtin.include_tasks:
|
2024-07-14 14:15:21 +00:00
|
|
|
file: tasks/vault/vault_deploy.yml
|
2024-08-26 21:10:04 +00:00
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- vault
|
2024-06-25 13:16:42 +00:00
|
|
|
|
2024-07-14 14:15:21 +00:00
|
|
|
# Nomad nodes deployment
|
2024-06-25 13:16:42 +00:00
|
|
|
- name: "Deploy Nomad"
|
|
|
|
tags:
|
|
|
|
- nomad
|
2024-08-26 21:10:04 +00:00
|
|
|
- nomad_servers
|
|
|
|
- nomad_clients
|
2024-06-25 13:16:42 +00:00
|
|
|
when:
|
|
|
|
- enable_nomad | bool
|
2024-08-17 12:09:24 +00:00
|
|
|
ansible.builtin.include_tasks:
|
2024-07-14 14:15:21 +00:00
|
|
|
file: tasks/nomad/nomad_deploy.yml
|
2024-08-26 21:10:04 +00:00
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- nomad
|
|
|
|
|
2024-07-25 20:29:19 +00:00
|
|
|
|
|
|
|
# - 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"
|