From 2fc597fc44bb5eae13aafc557aba02e946d4600b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Thu, 22 Aug 2024 09:33:39 +0200 Subject: [PATCH] contrib: setup_templates: use a mount unit for the job config file This feels a bit cleaner than calling mount in a service unit. --- .../setup_templates/generic/cloud-init/user-data | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contrib/setup_templates/generic/cloud-init/user-data b/contrib/setup_templates/generic/cloud-init/user-data index d902c89..5a9fe80 100644 --- a/contrib/setup_templates/generic/cloud-init/user-data +++ b/contrib/setup_templates/generic/cloud-init/user-data @@ -14,11 +14,22 @@ write_files: ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM + - path: /etc/systemd/system/home-runner-config.mount + content: | + [Unit] + Description=Forrest Job config filesystem mount + + [Mount] + What=/dev/disk/by-label/JOBDATA + Where=/home/runner/config + Options=rw,fmask=0022,dmask=0022,uid=runner,gid=runner + - path: /etc/systemd/system/github-action-runner.service content: | [Unit] Description=GitHub JIT Runner - After=network.target cloud-final.service + After=network.target cloud-final.service home-runner-config.mount + Requires=home-runner-config.mount [Service] ExecStart=/home/runner/config/job.sh