--- # 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.import_tasks: file: tasks/load_vars.yml tags: - always # Consul nodes deployment - name: "Deploy Consul" tags: - consul when: - enable_consul | bool ansible.builtin.import_tasks: file: tasks/consul/consul_deploy.yml # 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" # Vault nodes deployment - name: "Deploy Vault" tags: - vault when: - enable_vault | bool ansible.builtin.import_tasks: file: tasks/vault/vault_deploy.yml # Nomad nodes deployment - name: "Deploy Nomad" tags: - nomad when: - enable_nomad | bool ansible.builtin.import_tasks: file: tasks/nomad/nomad_deploy.yml