From 78addfcad932796c685d99973de669f9ba3db051 Mon Sep 17 00:00:00 2001
From: Karl Grube <karl@hudlergrube.com>
Date: Wed, 6 Jul 2022 17:34:19 +0200
Subject: [PATCH] root_crt work

---
 tasks/root_crt_creation.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tasks/root_crt_creation.yml b/tasks/root_crt_creation.yml
index a5a0935..9eb220a 100644
--- a/tasks/root_crt_creation.yml
+++ b/tasks/root_crt_creation.yml
@@ -9,7 +9,7 @@
     msg: "If the next task fails, then you need to decrypt the ansible vault."
 - name: create root certificate
   expect:
-    command: "openssl req -config {{root_ca_ini}} -engine pkcs11 -keyform engine -key {{root_ca_hsm_key[0].id}} -new -x509 -days 3650 -sha512 -extensions v3_ca -out {{root_ca_crt}}"
+    command: "openssl req -config {{root_ca_ini}} -engine pkcs11 -keyform engine -key {{root_ca_hsm_key.id}} -new -x509 -days 3650 -sha512 -extensions v3_ca -out {{root_ca_crt}}"
     responses: 
       Enter PKCS#11 token PIN: "{{hsm_pin}}"
     chdir: "{{ca_dir}}"
-- 
GitLab