From ab0dd20f8aec0d4d845a45319344206405bfdd7d Mon Sep 17 00:00:00 2001
From: Lars With <lars@with.de>
Date: Sun, 26 Feb 2023 11:23:31 +0100
Subject: [PATCH] add variant vault

---
 ansible/ansible-playbook-vault.yml | 41 ++++++++++++++++++++++++++++++
 ansible/ansible-requirements.yml   |  2 +-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 ansible/ansible-playbook-vault.yml

diff --git a/ansible/ansible-playbook-vault.yml b/ansible/ansible-playbook-vault.yml
new file mode 100644
index 0000000..ebe12f6
--- /dev/null
+++ b/ansible/ansible-playbook-vault.yml
@@ -0,0 +1,41 @@
+---
+
+- hosts: all
+  gather_facts: no
+
+  pre_tasks:
+
+    - name: Wait for system to become reachable
+      ansible.builtin.wait_for_connection:
+
+    - name: Gather facts for first time
+      ansible.builtin.setup:  
+
+    - name: Ensure apt cache updated and upgraded
+      ansible.builtin.apt:
+        update_cache: "yes"
+        upgrade:      "yes"
+
+  roles:
+
+    - role: reboot_required
+
+    - role: fail2ban
+
+    - role: hashicorp_vault
+      vars:
+        vault_install_method:     binary
+        vault_binary_archive_src: https://releases.hashicorp.com/vault/1.12.3/vault_1.12.3_linux_amd64.zip
+        vault_configure:          false
+        vault_start:              false
+        vault_init:               false
+        vault_unseal:             false
+        vault_create_root_token:  false
+
+  tasks:
+
+    - name: Install gettext-base (envsubst)
+      ansible.builtin.apt:
+        name: gettext-base
+
+...
\ No newline at end of file
diff --git a/ansible/ansible-requirements.yml b/ansible/ansible-requirements.yml
index 3ed1b90..8afeb0c 100644
--- a/ansible/ansible-requirements.yml
+++ b/ansible/ansible-requirements.yml
@@ -27,7 +27,7 @@ roles:
     scm:     git
     version: 0.0.3
 
-  - name:    vault
+  - name:    hashicorp_vault
     src:     https://gitlab.with.de/ansible/ansible-role-vault.git
     scm:     git
     # version: 3.3.7
-- 
GitLab