Skip to content

Commit

Permalink
systemd/system: add sshkeys@.service
Browse files Browse the repository at this point in the history
this service allows to conditionnally start the
`coreos-metadata-sshkeys@.service` on DO, EM, EC2 and GGE with the default `core` instance in
order to control the `coreos-metadata-sshkeys@.service` from the
generic image and not from the OEM.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
  • Loading branch information
tormath1 committed Sep 7, 2023
1 parent 6929ace commit 68a21a0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions systemd/system/sshkeys@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[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@%i.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true

[Install]
WantedBy=multi-user.target
DefaultInstance=core

0 comments on commit 68a21a0

Please sign in to comment.