rust-afterburn/0002-systemd-enable-sshkeys-unit-on-supported-platforms.patch
Robert Fairley 9127d81e03 Add afterburn-sshkeys@.service patches to enable the unit on supported platfoms only
See upstream changes: https://github.com/coreos/afterburn/pull/217

Signed-off-by: Robert Fairley <rfairley@redhat.com>
2019-05-22 11:20:19 -04:00

33 lines
1.2 KiB
Diff

From 25ed3f304937ef502cf0a2562f108511f927b70f Mon Sep 17 00:00:00 2001
From: Robert Fairley <rfairley@redhat.com>
Date: Tue, 14 May 2019 17:22:14 -0400
Subject: [PATCH] systemd: enable sshkeys unit on supported platforms
Add `ConditionKernelCommandLine` triggering conditions so that
the `afterburn-sshkeys@.service` unit is enabled on supported
platforms only.
Note this only adds conditions for platforms where the cloud
metadata provider is also identified through `ignition.platform.id`.
Part of: https://github.com/coreos/fedora-coreos-tracker/issues/4
---
systemd/afterburn-sshkeys@.service.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/systemd/afterburn-sshkeys@.service.in b/systemd/afterburn-sshkeys@.service.in
index 3bc8ff4..f0677e0 100644
--- a/systemd/afterburn-sshkeys@.service.in
+++ b/systemd/afterburn-sshkeys@.service.in
@@ -1,5 +1,10 @@
[Unit]
Description=Afterburn (SSH Keys)
+ConditionKernelCommandLine=|ignition.platform.id=aws
+ConditionKernelCommandLine=|ignition.platform.id=azure
+ConditionKernelCommandLine=|ignition.platform.id=digitalocean
+ConditionKernelCommandLine=|ignition.platform.id=gcp
+ConditionKernelCommandLine=|ignition.platform.id=packet
[Service]
Type=oneshot