From 28c73cf559d4cc64ff89eb56fcd9c6013f1c7d75 Mon Sep 17 00:00:00 2001 From: moson Date: Mon, 21 Aug 2023 09:30:37 +0200 Subject: [PATCH] root_ssh: Add variable to define additional keys Introduce "root_additional_keys" variable allowing us to deploy additional root keys with our "root_ssh" role Signed-off-by: moson --- roles/root_ssh/templates/authorized_keys.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/root_ssh/templates/authorized_keys.j2 b/roles/root_ssh/templates/authorized_keys.j2 index 624e9f53..6a3051dc 100644 --- a/roles/root_ssh/templates/authorized_keys.j2 +++ b/roles/root_ssh/templates/authorized_keys.j2 @@ -9,3 +9,8 @@ {% endif %} {% endif %} {% endfor %} +{% if root_additional_keys is defined %} + {% for pubkey in root_additional_keys -%} + {{ lookup('file', role_path + '/../../pubkeys/' + pubkey ) }} + {% endfor %} +{% endif %}