aetherscale

[unmaintained] code for a cloud provider tutorial
Log | Files | Refs | README | LICENSE

commit dd4cbdf215e5b0adc3bf06dcdbe2872fafa77185
parent 7a4d08043a8868b90f22d118b6d1bd6401b03418
Author: Stefan Koch <programming@stefan-koch.name>
Date:   Sun, 31 Jan 2021 12:25:51 +0100

create systemd files for guests to generate machine-id and ssh keys

Diffstat:
Adata/aetherscale-init-machine-id.service | 13+++++++++++++
Adata/aetherscale-init-ssh-key.service | 15+++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/data/aetherscale-init-machine-id.service b/data/aetherscale-init-machine-id.service @@ -0,0 +1,13 @@ +[Unit] +Description=Initialize machine-id for new VM +ConditionPathExists=!/etc/machine-id +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/dbus-uuidgen --ensure +ExecStart=/usr/bin/cp /var/lib/dbus/machine-id /etc/machine-id + +[Install] +WantedBy=multi-user.target diff --git a/data/aetherscale-init-ssh-key.service b/data/aetherscale-init-ssh-key.service @@ -0,0 +1,15 @@ +[Unit] +Description=Initialize SSH host keys for new VM +ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/ssh-keygen -A + +[Install] +WantedBy=multi-user.target