diff --git a/systemd/system/multi-user.target.wants/sshkeys@core.service b/systemd/system/multi-user.target.wants/sshkeys@core.service new file mode 120000 index 0000000..7361b33 --- /dev/null +++ b/systemd/system/multi-user.target.wants/sshkeys@core.service @@ -0,0 +1 @@ +../sshkeys@.service \ No newline at end of file diff --git a/systemd/system/sshkeys@.service b/systemd/system/sshkeys@.service new file mode 100644 index 0000000..bd456c9 --- /dev/null +++ b/systemd/system/sshkeys@.service @@ -0,0 +1,26 @@ +[Unit] +ConditionKernelCommandLine=|ignition.platform.id=packet +ConditionKernelCommandLine=|flatcar.oem.id=packet +ConditionKernelCommandLine=|coreos.oem.id=packet + +ConditionKernelCommandLine=|ignition.platform.id=ec2 +ConditionKernelCommandLine=|flatcar.oem.id=ec2 +ConditionKernelCommandLine=|coreos.oem.id=ec2 + +ConditionKernelCommandLine=|ignition.platform.id=digitalocean +ConditionKernelCommandLine=|flatcar.oem.id=digitalocean +ConditionKernelCommandLine=|coreos.oem.id=digitalocean + +ConditionKernelCommandLine=|ignition.platform.id=gce +ConditionKernelCommandLine=|flatcar.oem.id=gce +ConditionKernelCommandLine=|coreos.oem.id=gce + +Upholds=coreos-metadata-sshkeys@core.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/true + +[Install] +WantedBy=multi-user.target