Files
systemd/units/systemd-imds-import.service.in
T
Lennart Poettering 1228660400 imds: add "systemd-imds" tool that is a simple client to "systemd-imdsd"
This is a client tool to the systemd-imdsd@.service added in the
previous commit. It's mostly just a 1:1 IPC client via Varlink. It can
be used to query any IMDS key, but it's primary usecase is to acquire
the "userdata" from IMDS. Moreover, if invoked with the --import switch
it will check if the userdata contains a list of system credentials. If
so, it will import them into the local credstore. If the userdata does
not look like a list of system credentials no operation is executed,
under the assumption the data is intended for cloud-init instead.

It also imports a couple of other fields, if available and recogniuzed,
such as SSH keys and the hostname.
2026-03-26 10:54:15 +01:00

26 lines
826 B
Plaintext

# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Import System Credentials from IMDS
Documentation=man:systemd-imds(1)
Documentation=man:systemd.system-credentials(7)
DefaultDependencies=no
Wants=systemd-imdsd.socket network-online.target
After=systemd-imdsd.socket network-online.target
Before=sysinit.target systemd-firstboot.service
Conflicts=shutdown.target
Before=shutdown.target
ConditionPathExists=/etc/initrd-release
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart={{LIBEXECDIR}}/systemd-imds --import