1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/install_arch/files/ec2-public-keys.service
Kristian Klausen 645b1a003c
Add small script to fetch SSH keys from the EC2 metadata service
This is meant to be used in the Hetzner cloud sandbox project, so SSH
keys can be injected when a new VM is created from e.g. a CI pipeline,
so that the CI pipeline can SSH to the newly created VM.

The EC2 metadata service is used over the Hetzner metadata service, as
it is supported by more providers (including Hetzner).
2023-08-19 22:02:13 +02:00

14 lines
276 B
SYSTEMD

[Unit]
Description=Fetch SSH public keys from the metadata service
Before=sshd.service
After=systemd-networkd-wait-online.service
ConditionFirstBoot=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/ec2-public-keys
[Install]
WantedBy=multi-user.target