ansible: Correct runcmd to deploy SSH public keys in profiles
authorKienan Stewart <kstewart@efficios.com>
Wed, 31 Jan 2024 14:02:34 +0000 (09:02 -0500)
committerKienan Stewart <kstewart@efficios.com>
Fri, 2 Feb 2024 14:07:03 +0000 (09:07 -0500)
`authorized_keys` should be a file, not a directory.

Change-Id: Ia8d250149b77f6e812a311509e70900f2a975c9b
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
automation/ansible/roles/lxd/templates/init.yaml.j2

index 58802826c2765c1b8d3bbf7be108bdace1a0f1aa..52ae5ff3c72b7003504a6f760b830c440b122110 100644 (file)
@@ -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:
This page took 0.023267 seconds and 4 git commands to generate.