From d619c29bb64dc90bf659d57d3c179fb90c6546e5 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa <jelle@archlinux.org> Date: Sat, 27 Mar 2021 14:22:07 +0100 Subject: [PATCH] Allow for a key to be deployed on all hosts To use a key as backup key to be deployed on all hosts. --- roles/archusers/templates/authorized_keys.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/archusers/templates/authorized_keys.j2 b/roles/archusers/templates/authorized_keys.j2 index 3e7043276..899175614 100644 --- a/roles/archusers/templates/authorized_keys.j2 +++ b/roles/archusers/templates/authorized_keys.j2 @@ -2,7 +2,7 @@ {{ lookup('file', '../pubkeys/' + item.value.ssh_key) }} {% if item.value.additional_ssh_keys is defined %} {% for key in item.value.additional_ssh_keys %} - {% if inventory_hostname in key.hosts %} + {% if inventory_hostname in key.hosts or 'all' in key.hosts %} {{ lookup('file', '../pubkeys/' + key.name) }} {% endif %} {% endfor %} -- GitLab