From a4326dd7c4fbd3ec6d370735d036542acc867598 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 31 Jan 2024 09:02:34 -0500 Subject: [PATCH] ansible: Correct runcmd to deploy SSH public keys in profiles `authorized_keys` should be a file, not a directory. Change-Id: Ia8d250149b77f6e812a311509e70900f2a975c9b Signed-off-by: Kienan Stewart --- automation/ansible/roles/lxd/templates/init.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/ansible/roles/lxd/templates/init.yaml.j2 b/automation/ansible/roles/lxd/templates/init.yaml.j2 index 5880282..52ae5ff 100644 --- a/automation/ansible/roles/lxd/templates/init.yaml.j2 +++ b/automation/ansible/roles/lxd/templates/init.yaml.j2 @@ -26,7 +26,7 @@ profiles: - netplan.io - openssh-server runcmd: - - ['mkdir', '-p', '/root/.ssh/authorized_keys'] + - ['mkdir', '-p', '/root/.ssh'] - "echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBnCyGcahJXys7md2yb3jP8L6hLN3D72aZCzsqUrJDsC\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVFn/ymsG8LqPvgVzyMaSVzYCVn/440ME8O6AzbZG39' > /root/.ssh/authorized_keys" description: "" devices: @@ -53,7 +53,7 @@ profiles: - netplan.io - openssh-server runcmd: - - ['mkdir', '-p', '/root/.ssh/authorized_keys'] + - ['mkdir', '-p', '/root/.ssh'] - "echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBnCyGcahJXys7md2yb3jP8L6hLN3D72aZCzsqUrJDsC\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVFn/ymsG8LqPvgVzyMaSVzYCVn/440ME8O6AzbZG39' > /root/.ssh/authorized_keys" description: "CI node" devices: -- 2.34.1