2023-12-15 17:45:58 +00:00
|
|
|
---
|
|
|
|
# hashistack deployment playbook
|
|
|
|
- name: "Deploy"
|
|
|
|
hosts: all
|
|
|
|
gather_facts: true
|
2023-12-24 17:09:08 +00:00
|
|
|
become: true
|
2023-12-15 17:45:58 +00:00
|
|
|
tasks:
|
2023-12-28 21:38:26 +00:00
|
|
|
- name: "Include ednxzu.hashicorp_vault"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: ednxzu.hashicorp_vault
|
2023-12-24 17:09:08 +00:00
|
|
|
|
2023-12-28 21:38:26 +00:00
|
|
|
- name: "Initialize vault cluster"
|
2023-12-24 17:09:08 +00:00
|
|
|
ednxzu.hashistack.vault_init:
|
2023-12-28 21:38:26 +00:00
|
|
|
api_url: "http://127.0.0.1:8200"
|
|
|
|
key_shares: 3
|
|
|
|
key_threshold: 2
|
|
|
|
run_once: true
|
|
|
|
delegate_to: "{{ groups['vault_servers'] | first }}"
|
|
|
|
register: _vault_init_secret
|
|
|
|
|
|
|
|
- name: "Debug"
|
|
|
|
ansible.builtin.debug:
|
|
|
|
msg: "{{ _vault_init_secret }}"
|
|
|
|
when: _vault_init_secret is defined
|