From 69c037c1367a966e2d8000ad9c0d45d40399baa7 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 6 Jun 2021 00:41:53 -0400 Subject: [PATCH] Ensure backup_keys isn't empty --- roles/base/templates/var/backups/ssh/authorized_keys.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/base/templates/var/backups/ssh/authorized_keys.j2 b/roles/base/templates/var/backups/ssh/authorized_keys.j2 index 5919c71..ec6bd15 100644 --- a/roles/base/templates/var/backups/ssh/authorized_keys.j2 +++ b/roles/base/templates/var/backups/ssh/authorized_keys.j2 @@ -1,7 +1,7 @@ # backup user authorized_keys # {{ ansible_managed }} -{% if backup_keys is defined %} +{% if backup_keys is defined and backup_keys %} {% for key in backup_keys %} {{ key }} {% endfor %}