From d48b98949948fd056c09af96db8d2cf32d8590a0 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 2 Jul 2022 19:28:24 -0300 Subject: [PATCH] ensure ssh keys are kept from live system --- tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/install.yml b/tasks/install.yml index 1f72169..9b1998e 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -31,7 +31,7 @@ dest: "/mnt/etc/mkinitfs/mkinitfs.conf" mode: "0750" - name: "Copy SSH host keys from the live system." - shell: "cp -a /etc/ssh/*_key* /mnt/etc/ssh/" + shell: "rm /mnt/etc/ssh/*_key* -f && cp -a /etc/ssh/*_key* /mnt/etc/ssh/" args: creates: "/mnt/etc/ssh/ssh_host_ed25519_key" - name: "Copy SSH authorized keys from the live system. First create the /root/.ssh directory."