From cfc06cebaf4639a16f167a035097efd39d8112d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Fri, 22 Dec 2023 12:49:28 +0100
Subject: [PATCH] Resolve "CI pipeline can't find Vault password file..."

---
 .gitlab-ci.yml                           | 5 +++--
 molecule/resources/playbooks/prepare.yml | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0f64fa6..79eed55 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,10 +22,11 @@ test-job:
     - "shell"
   script:
     # make sure that Ansible Vaults are present and can be decrypted
-    - echo "${VAULT_VALIDATORS}" > ../../../lza_validators.pass
+    - echo "${VAULT_VALIDATORS}" > ../lza_validators.pass
     - export ANSIBLE_VAULT_IDENTITY_LIST="../../../lza_validators.pass"
     - rm -rf ../ansible_vaults/
-    - git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/; \
+    - git clone https://gitlab+deploy-token-25:${VAULT_ACCESS_TOKEN}@git.slub-dresden.de/slub-referat-2-3/ansible_vaults.git ../ansible_vaults/;
+    - for FILE in $( find / -name "lza_validators.pass" ); do ls -l $FILE; done
     # run Molecule tests
     - molecule syntax --scenario-name default
     # We cannot use `molecule lint` anymore because:
diff --git a/molecule/resources/playbooks/prepare.yml b/molecule/resources/playbooks/prepare.yml
index 97b9286..7c0df0c 100644
--- a/molecule/resources/playbooks/prepare.yml
+++ b/molecule/resources/playbooks/prepare.yml
@@ -95,6 +95,7 @@
           loop:
             - "/usr/share/ca-certificates/{{ ansible_hostname }}-selfsigned.crt"
             - "/etc/ssl/certs/{{ ansible_hostname }}-selfsigned.crt"
+            - "/etc/ssl/certs/server.pem"
           changed_when: false    # I don't have any idea why this isn't idempotent.
         - name: >
             configure ca-certificates.conf to include our self-signed certificate
-- 
GitLab